[This is preliminary documentation and subject to change.]
The MsiGetProductInfo function returns product information for published and installed products.
INSTALLSTATE MsiGetProductInfo(
LPCTSTR szProduct, // product code
LPCTSTR szProperty, // product property
LPTSTR lpValueBuf, // buffer to return property value
DWORD *pcchValueBuf // in/out buffer character count,
// including NULL
);
Installed Properties | Description |
---|---|
INSTALLPROPERTY_INSTALLEDPRODUCTNAME | Installed product name |
INSTALLPROPERTY_VERSIONSTRING | Product version |
INSTALLPROPERTY_HELPLINK | Support link |
INSTALLPROPERTY_HELPTELEPHONE | Support telephone |
INSTALLPROPERTY_INSTALLLOCATION | Installation location |
INSTALLPROPERTY_INSTALLSOURCE | Installation source |
INSTALLPROPERTY_INSTALLDATE | Installation date |
INSTALLPROPERTY_PUBLISHER | Publisher |
INSTALLPROPERTY_LOCALPACKAGE | Local cached package |
INSTALLPROPERTY_URLINFOABOUT | URL information |
INSTALLPROPERTY_URLUPDATEINFO | URL update information |
INSTALLPROPERTY_VERSIONMINOR | Minor product version |
INSTALLPROPERTY_VERSIONMAJOR | Major product version |
INSTALLPROPERTY_PACKAGECODE | Identifier of package product was installed from |
INSTALLPROPERTY_VERSION | Product version |
The properties in the following list can also be retrieved from applications that are advertised.
Advertised Properties | Description |
---|---|
INSTALLPROPERTY_TRANSFORMS | Transforms |
INSTALLPROPERTY_LANGUAGE | Product language |
INSTALLPROPERTY_PRODUCTNAME | Human readable product name |
If lpValueBuf is NULL, pcchValueBuf can be NULL.
When the MsiGetProductInfo function returns, the pcchValueBuf parameter contains the length of the class string stored in the buffer. The count returned does not include the terminating NULL character. If the buffer is not big enough, MsiGetProductInfo returns ERROR_MORE_DATA, and MsiGetProductInfo contains the size of the string, in characters, without counting the NULL character.
Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in msi.h.
Import Library: Use msi.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.