Export (0) Print
Expand All

Product.InstallProperty method

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 propertiesMeaning
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.

ValueDescription
ProductIDThe product identifier. For more information, see the ProductID property.
RegCompanyThe company registered to use this product.
RegOwnerThe 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.

ValueDescription
InstanceTypeA 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 propertiesDescription
INSTALLPROPERTY_TRANSFORMSTransforms.
INSTALLPROPERTY_LANGUAGEProduct language.
INSTALLPROPERTY_PRODUCTNAMEHuman readable–product name. For more information, see the ProductName property.
INSTALLPROPERTY_ASSIGNMENTTYPEEquals 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_PACKAGECODEIdentifier of the package this product was installed from. For details, see Package Codes.
INSTALLPROPERTY_VERSIONProduct version derived from the ProductVersion property.
INSTALLPROPERTY_PRODUCTICONPrimary icon for the package. For more information, see the ARPPRODUCTICON property.
INSTALLPROPERTY_PACKAGENAMEName of the original installation package.
INSTALLPROPERTY_AUTHORIZED_LUA_APPA 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

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

Product
Not Supported in Windows Installer 2.0 and earlier

 

 

Community Additions

ADD
Show:
© 2015 Microsoft