- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Major Upgrade detection from InstallScript
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @agshah
See whether the "IS_MAJOR_UPGRADE" property is set or not. Installshield sets this property if a major upgrade is taking place.
See, previous community query:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @agshah
See whether the "IS_MAJOR_UPGRADE" property is set or not. Installshield sets this property if a major upgrade is taking place.
See, previous community query:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi 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
