We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

tsleon
Posts: 11
Joined: Wed Sep 18, 2013 7:07 pm

Using side by side installation with previous path by default

Hi,

I need to simultaneously install different versions of my software product. For this, I use mode "Allow side by side ...". But when user run the installation file, the default is new path as "Application folder" from "Install parameters" page. And I need to have a path to the previous version by default. And if the user does not want to upgrade the previous version, and wants to put the new version in a different folder, then he will choose a different path. How to make that the installer set a path to the previous version by default, as it doing in mode "Automatically upgrade older product...", but in mode "Allow side by side ..."?

Best regards,
Leonid
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Using side by side installation with previous path by default

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
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tsleon
Posts: 11
Joined: Wed Sep 18, 2013 7:07 pm

Re: Using side by side installation with previous path by default

Hello Sorin,

Thank you for information!

Best regards,
Leonid
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Using side by side installation with previous path by default

Hello Leonid,

You are welcome!

Please let me know if you have any other questions or doubts.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”