The InstallProperty property is the value of the property for the instance of this product.
This property calls the MsiGetProductInfoEx function, with the ProductCode, UserSid and Context of the Product object and the requested property as a parameter.
Syntax
Product.InstallProperty(
property
)
Parameters
property
Specifies the property to be retrieved. The properties in the following list can only be retrieved from applications that are already installed. Note that required properties are guaranteed to be available, but other properties are available only if that property has been set. See the indicated links to the installer properties for information about how each property is set.
| Installed properties | Meaning |
|---|---|
| INSTALLPROPERTY_PRODUCTSTATE | State of the product returned in string form as "1" for Advertised and "5" for installed. |
| INSTALLPROPERTY_HELPLINK | Support link. For more information, see the ARPHELPLINK property. |
| INSTALLPROPERTY_HELPTELEPHONE | Support telephone. For more information, see the ARPHELPTELEPHONE property. |
| INSTALLPROPERTY_INSTALLDATE | The last time this product received service. The value of this property is replaced each time a patch is applied or removed from the product or the /v Command-Line Option is used to repair the product. If the product has received no repairs or patches this property contains the time this product was installed on this computer. |
| INSTALLPROPERTY_INSTALLEDPRODUCTNAME | Installed product name. For more information, see the ProductName property. |
| INSTALLPROPERTY_INSTALLLOCATION | Installation location. For more information, see the ARPINSTALLLOCATION property. |
| INSTALLPROPERTY_INSTALLSOURCE | Installation source. For more information, see the SourceDir property. |
| INSTALLPROPERTY_LOCALPACKAGE | Local cached package. |
| INSTALLPROPERTY_PUBLISHER | Publisher. For more information, see the Manufacturer property. |
| INSTALLPROPERTY_URLINFOABOUT | URL information. For more information, see the ARPURLINFOABOUT property. |
| INSTALLPROPERTY_URLUPDATEINFO | URL update information. For more information, see the ARPURLUPDATEINFO property. |
| INSTALLPROPERTY_VERSIONMINOR | Minor product version derived from the ProductVersion property. |
| INSTALLPROPERTY_VERSIONMAJOR | Major product version derived from the ProductVersion property. |
| INSTALLPROPERTY_VERSIONSTRING | Product version. For more information, see the ProductVersion property. |
To retrieve the product ID, registered owner, or registered company from applications that are already installed, set property to one of the following text string values.
| Value | Description |
|---|---|
| ProductID | The product identifier. For more information, see the ProductID property. |
| RegCompany | The company registered to use this product. |
| RegOwner | The owner registered to use this product. |
To retrieve the instance type of the product, set property to the following value. This property is available for advertised or installed products.
| Value | Description |
|---|---|
| InstanceType | A missing value or a value of 0 indicates a normal product installation. A value of 1 indicates a product installed using a multiple instance transform and the MSINEWINSTANCE property. Available with the installer running Windows Server 2003 or Windows XP with SP1. For more information, see Installing Multiple Instances of Products and Patches. |
The properties in the following list can also be retrieved from applications that are advertised. These properties cannot be retrieved for product instances that are installed under a per-user-unmanaged context for user accounts other than current user account.
| Advertised properties | Description |
|---|---|
| INSTALLPROPERTY_TRANSFORMS | Transforms. |
| INSTALLPROPERTY_LANGUAGE | Product language. |
| INSTALLPROPERTY_PRODUCTNAME | Human readable–product name. For more information, see the ProductName property. |
| INSTALLPROPERTY_ASSIGNMENTTYPE | Equals zero (0) if the product is advertised or installed per-user. Equals one (1) if the product is advertised or installed per-computer for all users. |
| INSTALLPROPERTY_PACKAGECODE | Identifier of the package this product was installed from. For details, see Package Codes. |
| INSTALLPROPERTY_VERSION | Product version derived from the ProductVersion property. |
| INSTALLPROPERTY_PRODUCTICON | Primary icon for the package. For more information, see the ARPPRODUCTICON property. |
| INSTALLPROPERTY_PACKAGENAME | Name of the original installation package. |
| INSTALLPROPERTY_AUTHORIZED_LUA_APP | A value of 1 indicates a product that can be serviced by non-administrators using User Account Control (UAC) Patching. A missing value or a value of 0 indicates least-privilege patching is not enabled. Available with Windows Installer 3.0 and later. |
Return value
This method does not return a value.
Remarks
If the call succeeds, the property contains the value as a string.
Requirements
| Requirement | Value |
|---|---|
| Version | Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer 3.0 or later on Windows Server 2003, Windows XP, and Windows 2000 |
| DLL | Msi.dll |
| IID | IID_IProduct is defined as 000C10A0-0000-0000-C000-000000000046 |
See also
Not Supported in Windows Installer 2.0 and earlier
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
