- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Automatic Major Upgrade detection question
- 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
Automatic Major Upgrade detection question
Hi All,
I have IS 2022 R1, Basic MSI project and want to be able to detect if automatic major upgrade is happening when the existing version is getting uninstalled.
For example,
I install Version 1.0.
I prepared Version 2.0 to support Automatic Major Upgrade.
I install Version 2.0.
I have InstallScript function that gets invoked when Version 1.0 is UnInstalled.
I also have InstallScript function that gets invoked when Version 2.0 is getting Installed.
I use below code in both above scenarios to tell me if automatic upgrade is happening.
MsiGetProperty(ISMSI_HANDLE, "IS_MAJOR_UPGRADE", svIsMajorUpgrade, nBufferSize);
When Version 2.0 is getting installed, above code detects automatic upgrade is happening and hence I am able to perform certain tasks.
But during the upgrade, when Version 1.0 is getting UnInstalled, the above code is not able to detect that this is an upgrade. I need to perform certain tasks at uninstall time when Version 1.0 is uninstalled during the automatic upgrade. How can I achieve this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
When a Major Upgrade uninstalls the previous version the Property UPGRADINGPRODUCTCODE is created - you can try using that to identify the uninstall instead of IS_MAJOR_UPGRADE