How to Find Installation Folder?
I have a created a Install Shield project that performs a major upgrade. The older version of the product being upgraded may have been installed into a folder that differs from new version of the our product.
The upgrade is working well but a need has arisen to allow the user to select files to be backed up prior to the upgrade removing them from the original location.
How can I via script retrieve the folder path (installation folder) of the product being upgraded?
Lets say that version 1 of the product was installed in C:\Program Files\Version1
And version 2 of the product will be installed in C:\Program Files\Version2
Now when I upgrade from Version1 to Version2, I need to determine that when version1 was installed, the user installed it into C:\Program Files\Version1
InstallShield seems to know - how can I find this information - I assume the Registry? But my searches have not provided any meaningful information.
Each version of our product has within InstallShield:
A unique version number
A unique product code
A unique package code
Common Upgrade code
I hope someone can shed some light on this for me.
Given the older product's ProductCode value, you can call MsiGetProductInfo with INSTALLPROPERTY_INSTALLLOCATION (or Installer.ProductInfo with "InstallLocation") to get the old installation directory.
How will I know what the colder product was? With my project being a major upgrade the product code changes from release to release and the use may be jumping versions when upgrading?
Version 1 has a product code of a
Version 2 has a product code of b
Version 3 has a product code of c
All 3 share a common upgrade code.
If a user starts with version 1 and decides to proceed to version 3 without passing through version 2? How would I code IS to handle this situation?
The "action property" in the Upgrade table (usu. ISACTIONPROP1) will be semicolon-separated list of ProductCode values for products being removed, so perhaps use that?
I checked in the Upgrade table and only the upgrade code is shown. I don't see any product codes listed there?