MSI.GetProductInfo

string MSI.GetProductInfo ( 

string ProductCode,

string Property )

Description

Calls the MsiGetProductInfo function to get product information for published and installed products given a specified property.

Parameters

ProductCode

(string) The "product code" of the product whose information you want. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Property

(string) The property containing the value you want. Some properties can only be retrieved if they have been set. You can use the available properties listed below, or one that you've previously set yourself.

The following properties can only be retrieved from applications that are installed:

Note: For more information about the properties listed below, see the Property Reference topic in the online MSDN.

PROPERTY

DESCRIPTION

"HelpLink"

The support link. For more information, see the ARPHELPLINK property.

"HelpTelephone"

The support telephone. For more information, see the ARPHELPTELEPHONE property.

"InstallDate"

The installation date.

"InstalledProductName"

The installed product name. For more information, see the ProductName property.

"InstallLocation"

The installation location. For more information, see the ARPINSTALLLOCATION property.

"InstallSource"

The installation source. For more information, see the SourceDir property.

"LocalPackage"

The local cached package.

"Publisher"

The publisher. For more information, see the Manufacturer property.

"URLInfoAbout"

The URL information. For more information, see the ARPURLINFOABOUT property.

"URLUpdateInfo"

The URL update information. For more information, see the ARPURLUPDATEINFO property.

"VersionMinor"

The minor product version derived from the ProductVersion property.

"VersionMajor"

The major product version derived from the ProductVersion property.

"VersionString"

The product version. For more information, see the ProductVersion property.

"ProductID"

The product identifier for the product. For more information, see the ProductID property.

"RegCompany"

The company registered to use this product.

"RegOwner"

The owner registered to use this product.

The following properties can be retrieved from applications that are advertised or installed:

PROPERTY

DESCRIPTION

"InstanceType"

A missing value or a value of "0" (zero) indicates a normal product installation. A value of "1" (one) indicates a product installed using a multiple instance transform and the MSINEWINSTANCE property. Available with the installer running Windows Server 2003 family or Windows XP SP1. For more information see the MSDN article: Installing Multiple Instances of Products and Patches.

"Transforms"

The transforms.

"Language"

The product language.

"ProductName"

The product name. For more information, see the ProductName property.

"AssignmentType"

Returns "0" (zero) if the product is advertised or installed per-user.

Returns "1" (one) if the product is advertised or installed per-machine for all users.

"PackageCode"

The identifier of the package this product was installed from.

"Version"

The product version derived from the ProductVersion property.

"ProductIcon"

The primary icon for the package. For more information, see the ARPPRODUCTICON property.

"PackageName"

The name of the original installation package.

"AuthorizedLUAApp"

A returned value of one (1) indicates a product that can be serviced by non-administrators using User Account Control (UAC) Patching. A missing value or returned value of 0 (zero) indicates that least-privilege patching is not enabled. Available in Windows Installer 3.0 or later.

Returns

(string) A string containing the value of the specified property. If this action fails, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions