Hello Leonid,
You could implement this scenario using a registry search that will return the APPDIR of the previous installation and then set the current APPDIR to this value. When the user launches the new package, the default installation path will be set to the old version's installation path. If the user doesn't modify this path, a major upgrade will be performed. If the user will choose another path, a side by side installation will be performed.
This is the complete implementation :
The old project:
- should be configured to allow side by side installs of different product versions (from "Upgrades" page)
- should create a registry value containing the [APPDIR] formated reference. This value is created automatically in any new Advanced Installer project in Current User/Local Machine\SOFTWARE\[Manufacturer]\[ProductName]
The new project:
- should be configured to allow side by side installs of different product versions (from "Upgrades" page) as well
- go to "Searches" page and create a new search. Right click on it and select "Add Search Location" - "Registry". Configure the Registry location properties as follows:
Code: Select all
ROOT : HKEY_LOCAL_MACHINE (if your packages are per-machine)
Key : SOFTWARE\[Manufacturer]\[ProductName]
Name : Path
Also, if your packages type is 64-bit, you should check :Search the 64-bit portion of the registry" as well.
-go to custom actions page and add a new "Set Installer Property" custom action configured to run on "Wizzard Dialogs Stage", placed after searches. Configure this custom action as follows:
Code: Select all
Property : APPDIR
Value: [RESULT_PROPERTY]
Best regards,
Sorin
FOLLOW US
Get the latest news in Application Packaging