cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
agshah
Level 7

Major Upgrade detection from InstallScript

Jump to solution

Hi all,

I have an IS 2018 InstallScript MSI project. I have made changes in the upgrade view and added an upgrade item to support automatic major upgrades.

Question is how do I detect in the install script if the installation is going to perform a major upgrade.

To be more specific, in the install script .Rul file, in the OnFirstUIBefore function, I want to know if the installation will proceed with 'Major Upgrade' or not and based on that I want to perform certain installation tasks.

Is there any InstallShield InstallScript property that I can check to see if 'Major Upgrade' will be performed?

 

thanks in advance.

Labels (1)
0 Kudos
(2) Solutions
banna_k
Revenera
Revenera

I was able to use MsiGetProperty on IS_MAJOR_UPGRADE and see that it is set to 'Yes' for a major upgrade.

So this works. thanks for your response and help with this.

View solution in original post

0 Kudos
(5) Replies
banna_k
Revenera
Revenera

Hi @agshah

See whether the "IS_MAJOR_UPGRADE" property is set or not. Installshield sets this property if a major upgrade is taking place

https://helpnet.flexerasoftware.com/installshield22helplib/helplibrary/ConfiguringMajorUpgradeProps.htm

See, previous community query:

https://community.flexera.com/t5/InstallShield-Forum/Detecting-an-upgrade-in-InstallScript-MSI-project/m-p/76203 

 

thanks. Can I please ask how I can check for IS_MAJOR_UPGRADE property from install script?

Do I call 'MsiGetProperty' ? If so, what can be the value of IS_MAJOR_UPGRADE?

true or false?

yes or no?

Or is IS_MAJOR_UPGRADE a boolean and if so do I use an 'if' condition ?

for example, 

if (IS_MAJOR_UPGRADE) then

endif;

0 Kudos

I was able to use MsiGetProperty on IS_MAJOR_UPGRADE and see that it is set to 'Yes' for a major upgrade.

So this works. thanks for your response and help with this.

0 Kudos

I am running into one problem now with respect to IS_MAJOR_UPGRADE property.

I have added a Major Upgrade item and specified product version 7.0.0 as the 'Minimum Version' to do the upgrade.

But even if I have version 6.0.0, IS_MAJOR_UPGRADE is still set to 'Yes'. Why is it not set to 'No'

Appreciate any help.

0 Kudos

Hi agshah,

@agshah 

Can you please assist in how you checked if there is a major upgrade, i mean how did you use msigetproperty with IS_MAJOR_UPGRADE in installscript. I am trying to change the dialogs in onFirstUIEvents.rul if the installshield is in upgrade mode.

 

Any help would be really great

0 Kudos