cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
another_1
Level 4

Detecting an upgrade in InstallScript MSI project

Hello,
Is there a way in InstallScript to perform a certain action only if running an upgrade - does not matter, minor or major?
Using MAINTENANCE does not work for minor upgrades. !REMOVEALLMODE does not work because it includes a First install.
I can figure out how to do it using CA, but I prefer to use InstallScript.

Thank you,
MY
Labels (1)
0 Kudos
(4) Replies
Alpesh
Flexera Alumni

Hi,

You can use these properties -- IS_MINOR_UPGRADE gets set for a minor upgrade and IS_MAJOR_UPGRADE gets set for a major upgrade.

Thanks,
Alpesh
0 Kudos
another_1
Level 4

Alpesh wrote:
Hi,

You can use these properties -- IS_MINOR_UPGRADE gets set for a minor upgrade and IS_MAJOR_UPGRADE gets set for a major upgrade.

Thanks,
Alpesh

Right, but those are MSI properties, and I do not want to use those - we may later on switch to purely InstallScript, and this function will have to be re-written. Any suggestion for pure InstallScript? This is to be performed in "OnEnd" function.
0 Kudos
Alpesh
Flexera Alumni

In that case, check the documentation of VerProductCompareVersions method and see if that helps.
0 Kudos
another_1
Level 4

Thank you!
And how about the "First Install" condition? Can this be checked without using a function to compare versions?
0 Kudos