Product.InstallProperty Method

Windows Installer

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

Script
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

Installation date.

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

VersionWindows Installer 5.0 on 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
DLLMsi.dll
IIDIID_IProduct is defined as 000C10A0-0000-0000-C000-000000000046

See Also

Product

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.