I have a managed bootstrapper application with a bundle that includes four products. Each of the products are defined with "*"
for the Id and have a unique UpgradeCode.
In my managed bootstrapper, I need to get the ProductCode (GUID) for the products that are part of my bundle. The detect event handlers' event args (such as DetectPackageCompleteEventArgs
) have a PackageId
value which is the name of the msi (ex: the "Common.msi" package has a PackageId
of "Common.msi").
I also checked the BootstrapperApplicationData.xml file, which has the ProductCode
and UpgradeCode
of the bundle itself, but not in the WixPackageProperties
nodes for the individual products.
In the case of a related package being detected (upgrade), the ProductCode
is included in the DetectRelatedMsiPackageEventArgs
, but that event doesn't fire when the running the installer for the currently-installed version (ie: clicking "Modify" on Add/Remove Programs)
How can I determine at runtime in my MBA what the ProductCode is for the included products?
Additional info:
Ultimately, I'm using the product code to get the ARPINSTALLLOCATION
value using MsiGetProductInfo(productCode, "InstallLocation", strbuffer, len);
This is specifically for the case where the user is "modifying" an existing installation (ie: running the same installer version as an already installed bundle -- not an upgrade) and I need to determine the folder to which they installed originally.