Disable Downgrades - Advanced Installer Community
maxonico
Posts: 7
Joined: Tue Dec 27, 2016 8:59 pm

Disable Downgrades

Hello all,

I'm trying to prevent the user from downgrading our product, that is, going from 2.1.0 to 2.0.1. Is there a way to achieve this? Currently the project has:

We allow upgrades by doing this (2.0 -> 2.1):

Code: Select all

msiexec /i installer.msi REINSTALL=ALL REINSTALLMODE=voums
but, if you run the same command, you can do 2.1 -> 2.0.

I've tried using the launch conditions this way:

Code: Select all

(Not Installed OR ( (Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" )) )) OR ((AI_RESUME) AND (AI_NEWERPRODUCTFOUND))
And the upgrade table is as follows (versions change according to the product version):
aitable.png
aitable.png (3.81 KiB) Viewed 3106 times
Thanks!
maxonico
Posts: 7
Joined: Tue Dec 27, 2016 8:59 pm

Re: Disable Downgrades

Also, I would like to add that I added a custom action "MessageBox" (and removed the Launch Conditions), that will only be shown if "AI_NEWERPRODUCTFOUND" is true. Which should be when downgrading, but looking at the logs the condition is always false.

This custom action is right after "FindRelatedProducts".
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Disable Downgrades

Hello,

To achieve what you want you should only make sure your different versions of your product have different Product Codes (you can change this from "Product Details page -> Product IDs tab").

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”