This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: CustomAction called twice on Major Upgrade
Subscribe
- 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
‎Aug 26, 2010
06:47 AM
CustomAction called twice on Major Upgrade
I have a custom action sequenced after InstallFinalize. If I run a major upgrade then I have the problem that my custom action is called twice. It seems from the old package first and then again from the new package.
How can I avoid the first call? It should only call the custom action from the new package at the end?
How can I avoid the first call? It should only call the custom action from the new package at the end?
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 26, 2010
05:50 PM
A major upgrade performs (in effect) a silent, nested uninstallation of the old package or packages, performing any custom actions that would normally be performed.
For an older package to determine if it's being removed by a major upgrade, it can check the UPGRADINGPRODUCTCODE property, which can be used in a condition on a custom action that shouldn't run during removal by a major upgrade...
For an older package to determine if it's being removed by a major upgrade, it can check the UPGRADINGPRODUCTCODE property, which can be used in a condition on a custom action that shouldn't run during removal by a major upgrade...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 30, 2010
01:10 AM
thanks for the answere. I know the UPGRADINGPRODUCTCODE. But the problem is, that when I use this for the custom action it will be never called in an update - neither in the nested uninstallation sequence nor in the update sequence. I want that the custom action is only not called in sequence of the nested uninstallation of the old package but in the installation sequence of the new package it should be called. Is this possible?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 01, 2010
11:12 AM
What is the condition, Not UPGRADINGPRODUCTCODE? If you create an MSI log file, is there any more information about why the action runs?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 20, 2010
12:57 AM
When I'm using the condition "Not UPGRADINGPRODUCTCODE" for the custom action this custom action will not be called in the nested uninstallation nor in the new setup. But in the new setup it should be called. Any idea?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 20, 2010
10:09 AM
UPGRADINGPRODUCTCODE is only set in the nested uninstall of the old product, not in the install of the replacement. The action property in the Upgrade table item (default ISACTIONPROP1) gets set in the new install when it finds the related existing product, then UPGRADINGPRODUCTCODE is set on the uninstall's command line.
So using "Not UPGRADINGPRODUCTCODE" as the condition should work for the scenario you describe. If you find that the CA doesn't run for the new install, or that it does run for the uninstall, then you have another issue and will need to examine your log files for the cause.
So using "Not UPGRADINGPRODUCTCODE" as the condition should work for the scenario you describe. If you find that the CA doesn't run for the new install, or that it does run for the uninstall, then you have another issue and will need to examine your log files for the cause.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 21, 2010
08:49 AM
you're right. It works as you describe. Thank you 😄