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!

Naz
Posts: 1
Joined: Wed Sep 18, 2019 3:30 pm

Creating custom/bespoke Upgrade flow

Hi,
I am trying to create a bespoke upgrade flow of dialogs to offer upgrade of previously installed versions.

So far I have created a dialog which offers two options to the user on running the installation wizard. Options are INSTALL and UPGRADE (Side by Side option is selected in the Updates tab of Advance Installer to allow multiple versions of the application)

If user choose to Install the application it will install the application in the default manner by offering user to choose the installation folder for the install and all the rest goes fine and successfully installs the application.

If user chooses to Upgrade then I am displaying a custom dialog with a combo box which shows the list of all the versions currently installed (this i get through a custom action and search through the registry).
Once they chosen their version to upgrade then I am setting the APPDIR to the folder where the chosen version of the application is installed and then from there it successfully updates the application from the selected version to the version of the installer.

Problems I am facing here as as follows:
1. After the successfuly upgrade if I click on the Run button it gives me error because the path it tries to use for opening the application is incorrect.
2. The old version can still be found in the registry and in the Windows Add or Remove Programs list.
3. The upgraded version I much prefer to be on it's own directory e.g. if I am upgrading from version X to version Y then the C:\Program Files\Product\Product Version X should now be renamed to C:\Program Files\Product\Product Version Y as it's now upgraded to Y but it doesn't.

I know I am doing it in a custom fashion but can you suggest anything that I should have done differntly to avoid this situtation. I can share the AIP file if you want?

Thanks,
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Creating custom/bespoke Upgrade flow

Hi and welcome to Advanced Installer forums.

You encounter these problems because, most likely, the selected version is not uninstalled during the upgrade, it is only overwritten by the new one which is not recommended.

By using the predefined "side by side" support, you can choose to either install the new version next to all the existing ones or remove all of them and only keep the new version.

If you want to only uninstall a chosen version, you need to know its Product Code and remove it through a custom action that will be executed before the Install stage.

For example, you can add a registry entry in your project which value is set to the [ProductCode] property, so you can later easily get the Product Code related to a version and use it to uninstall that version.

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”