Note: Built-In Function Rules Usage Options
This BIF lists an installed product's attributes. Use and understanding of its return values requires knowledge of Windows Installer which you may obtain from the Internet. Indeed there are references to C header files in this description that may assist in understanding, and to give you a starting point in your search for further knowledge. LANSA cannot provide this to you.
Arguments
|
Return Values
|
Notes
This Built-In Function lists all products that are related to the Upgrade Code. The current Windows Installer documentation implies that there should only be one, but the code will list all products that are returned.
Products installed across all users in the system are listed. You may not have access rights to the Upgrade Code you have specified.
Attributes may be added to the list, so do not expect them in any particular order or even that the one you are looking for is returned. If the code lists a value, it will at least set the attribute return code to ER, it will not omit it from the list.
References are made below to attributes that are defined winerror.h and msi.h which are C header files.
Product Attributes
UpgradeCode - 38 byte GUID (Input value, but as it is optional the actual value used is returned in the list).
For each Product related to the Upgrade Code the following are returned:
ProductCode – 38 byte GUID
InstallContext – a value in the enumeration MSIINSTALLCONTEXT
SID – Security Identifier of the account under which this product instance exists.
The following values are easily mapped to the Attribute Identifier returned. For example, INSTALLPROPERTY_INSTALLEDPRODUCTNAME returns InstalledProductName. Listing the value used by C will enable you to search the Web for what the attribute means.
INSTALLPROPERTY_INSTALLEDPRODUCTNAME,
INSTALLPROPERTY_PACKAGENAME ,
INSTALLPROPERTY_TRANSFORMS ,
INSTALLPROPERTY_LANGUAGE ,
INSTALLPROPERTY_PRODUCTNAME ,
INSTALLPROPERTY_ASSIGNMENTTYPE ,
INSTALLPROPERTY_INSTANCETYPE ,
INSTALLPROPERTY_AUTHORIZED_LUA_APP ,
INSTALLPROPERTY_PACKAGECODE ,
INSTALLPROPERTY_VERSION ,
INSTALLPROPERTY_PRODUCTICON ,
// Product info attributes: installed information
INSTALLPROPERTY_INSTALLEDPRODUCTNAME ,
INSTALLPROPERTY_VERSIONSTRING ,
INSTALLPROPERTY_HELPLINK ,
INSTALLPROPERTY_HELPTELEPHONE ,
INSTALLPROPERTY_INSTALLLOCATION ,
INSTALLPROPERTY_INSTALLSOURCE ,
INSTALLPROPERTY_INSTALLDATE ,
INSTALLPROPERTY_PUBLISHER ,
INSTALLPROPERTY_LOCALPACKAGE ,
INSTALLPROPERTY_URLINFOABOUT ,
INSTALLPROPERTY_URLUPDATEINFO ,
INSTALLPROPERTY_VERSIONMINOR ,
INSTALLPROPERTY_VERSIONMAJOR ,
INSTALLPROPERTY_PRODUCTID ,
INSTALLPROPERTY_REGCOMPANY ,
INSTALLPROPERTY_REGOWNER ,
INSTALLPROPERTY_INSTALLEDLANGUAGE ,
INSTALLPROPERTY_PRODUCTSTATE ,
INSTALLPROPERTY_LASTUSEDSOURCE ,
INSTALLPROPERTY_LASTUSEDTYPE ,
INSTALLPROPERTY_MEDIAPACKAGEPATH ,
INSTALLPROPERTY_DISKPROMPT,
For example, following is a list of a few of the attributes returned for an example Product. Note that the Attribute Value field length was only 30 so a number of attributes, such as UpgradeCode, have a status of OV. LANSA has implemented the standard behaviour of truncating the value:
Patch Attributes
Each of the attributes will be listed starting with the Patch Code. When a Patch Code entry repeats, its the start of another patch. There can be many patches in some products, such as the Microsoft Windows product itself, so it's advisable to use a dynamic list.
PatchCode – 38 byte GUID
INSTALLPROPERTY_LOCALPACKAGE,
INSTALLPROPERTY_PATCHTYPE,
INSTALLPROPERTY_TRANSFORMS,
INSTALLPROPERTY_INSTALLDATE,
INSTALLPROPERTY_UNINSTALLABLE,
INSTALLPROPERTY_PATCHSTATE,
INSTALLPROPERTY_LUAENABLED,
INSTALLPROPERTY_DISPLAYNAME,
INSTALLPROPERTY_MOREINFOURL