Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

How to create a downgradable setup

Tue May 19, 2020 3:07 pm

Hello guys,

Since this was requested many times in the past by our users, today we are going to create together a setup that will contain the "Downgrade" logic in it.

A downgrade basically means the ability to install an older version over a newer version, e.g.: version 1.0.0 being able to upgrade version 2.0.0.

Let's consider you have a setup for your application with the version 2.0.0.

This setup is already installed on the machine.

In order to allow a downgrade for this version, please proceed as it follows:

- open your Advanced Installer project (for version 2.0.0)

- go to "Upgrades" page

- here, please check the "Customize Advanced Installer upgrade rules" option

- under "Upgrades" section, please double click on the rule that contains the "OLDPRODUCTS" property. Here, please set the "Max. Version" field to the following value:

Code: Select all

255.255.6555.6555
and check the "Include maximum version in range" option.

- now please double click on the rule that contains the "AI_NEWERPRODUCTFOUND" property. Here, please set the "Min. Version" field to the following value:

Code: Select all

255.255.6555.6555
and check the "Include minimum version in range" option.

- now please go to "Product Details" page. Here, change the version of your setup, e.g.:

2.0.0 --> 1.0.0

- rebuild the project. When asked about generating a new product code, please select "Generate New".

- install the product.

Additionally, for your reference, please find attached a sample project which achieves just what I have said above:

DowngradableSetup - Sample Projects.zip
(236.99KiB)Downloaded 1817 times

- please build the .AIP file from the "v2" folder and then run the resulted setup file.

Expected results: v2.0 should be installed (check Control Panel)

- now please build the .AIP file outside the "v2" folder and then run the resulted setup file.

Expected results: v2.0 should be uninstalled and v1.0 should be installed (check Control Panel)

Hope this will be of help.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”