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.
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.
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.
// Product info attributes: installed information
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:
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