Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 8

Retriving the version of the previous install

ProductVersion propert has the version info or the current installation. If we are doing an (major) upgrade, is the previous installations version kept in a property that we can retrieve?

The reason I need this is that a user wants to see from what version to what version they are upgrading in the dilalogs.
Labels (1)
0 Kudos
(3) Replies
Flexera Alumni

I don't think the older version numbers are stored in properties in the newer version. After FindRelatedProducts runs, the "action property" from the Upgrade table lists the product codes it will upgrade, and you can pass the product codes to MsiGetProductInfo or Installer.ProductInfo to get their versions and other information...
0 Kudos
Level 6

My question is somewhat related...

I have ProductA installed and ProductB requires a specific version of ProductA to be installed prior to installing ProductB. I only want to perform an install condition check, I do not want to have ProductA included with ProductB as a prerequisite/redistributable.

I have accomplished this by querying the registry via System Search feature by looking at the Version value in HKEY_CLASSES_ROOT\Installer\Products\GUID - where the GUID maps to ProductA - and then storing it in a property which is then used as an install condition for ProductB.

This works great as the GUID does not change for ProductA (or at least not while for all minor version upgrades where product code doesn't change). Where does the GUID come from? It doesn't appear to be the product code, upgrade code, or package code of ProductA.
0 Kudos
Flexera Alumni

That registry data is undocumented, so you might consider using a different type of search or the APIs instead; but for information about how those codes are generated, please see for example KB article Q105971.
0 Kudos