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

Re: how to add upgrade/downgrade feature in bootstrapper exe

Hello Balaji,
It is working fine for upgrade and downgrade.
I am really glad everything works as expected now.
While downgrading it is showing "Agree and Upgrade" button(and we want Agree and Downgrade button for downgrade).
This is indeed true and this happens due to the fact that your "Agree and Downgrade" button is, by default, hidden and has a control condition assigned to it which looks as it follows:

Code: Select all

AI_NEWERPRODUCTFOUND
In our case, the property is no longer populated, since we have set the minimum version to the maximum possible value in order to obtain the downgrade behavior.

Unfortunately, I'm afraid there is not much to do with our predefined support in this case, since we already did a "hack" in order to achieve the downgrade behavior.

What could be done here is a custom action, that is scheduled to run only during an "upgrade" and which compares the version of the main installation package with the version already installed. If the version from the main package is higher than the version already installed, set a property to a value and use it to condition whther you show the control or not (the "Accept and Upgrade" control). Similar to this, if the version from the main package is lower than the version, set the property to another value and use this to show the control (the "Accept and Downgrade" control).

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Balaji
Posts: 53
Joined: Wed May 06, 2020 9:15 am

Re: how to add upgrade/downgrade feature in bootstrapper exe

Hi Catalin,
Yes, completely agree with your last post.
I know, you did lots of things to achieve this scenario. It's really appreciable.
Just one query arrived in mind, please just take few minutes on this.

Query :

If suppose, MSI1 is installed from version 1.0.1 and then trying to install MSI2 from version 1.0.2 (or a vice-versa), so is it install MSI2 on same machine?

I am just curious about this use case. So, please let me know your comment on this.

Thanks,
Balaji
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: how to add upgrade/downgrade feature in bootstrapper exe

Hello Balaji,

I have tested this and it seems that that's not the case.

If MSI1 was installed in version 1.0.1 and then you try to install MSI2 in version 1.0.2, MSI2 will not be installed. Instead, both the main package and the prerequisite will be upgraded.

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

Return to “Building Installers”