Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detect uninstallation of prev version happening during Major upgrade

I have a Basic MSI project which does a major upgrade of previous builds.
It uninstalls the previous version and then installs new version.
I have added a customized warning message when user clicks on Remove in Add/Remove Programs so that user can still cancel uninstallation
if he has clicked by mistake.
But during upgrade also the same message is coming which I want to hide during upgrade.
since this message is in Uninstall logic.
if user selects on cancel then it will be a problem as upgrade will not happen.
Is there any way to detect if this uninstallation is happening as part of major upgrade or then I dont want to show this message.?

or is there any way to suppress Messages during silent installation of a basic MSI setup?
Labels (1)
0 Kudos
1 Reply
Flexera beginner

Re: Detect uninstallation of prev version happening during Major upgrade

I just did this for another reason this past week.

Suppose your error message is presented to the user via a Custom Action.
That custom action should have a condition on it that is: REMOVE="ALL" AND Not UPGRADINGPRODUCTCODE

REMOVE="ALL" is true when you are removing the product for any reason

UPGRADINGPRODUCTCODE is true when the product is being removed from an upgrade process.


Only execute when you are removing the entire product and not when doing so during an upgrade.

I think this is what you need.

Let me know how it works out.
0 Kudos