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: Condition for Custom Action to run only on 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
‎Oct 01, 2010
10:44 AM
Condition for Custom Action to run only on upgrade
First, I've searched and can't find one, but is there a listing somewhere of all the standard, built-in properties that can be checked in install conditions?
Anyway, here's my situation. We've got an application that we're upgrading and the new version stores data differently. I've got a custom action that runs an InstallScript function to perform some operations to handle a data conversion from the old version's format to the new version's format.
I've made this a Commit execution (I only want to run after I know for sure that the new version is fully and properly installed), and placed it right after InstallFinalize in the Installation Execute sequence.
My real question is, I want to put a condition on this custom action so that it only runs during the INSTALL of the new version, and ONLY when UPGRADING from the old version (don't want it to run on just a new, clean install of the new version). I DON'T want it to run when uninstalling, patching, doing a repair/reinstall, etc.
We will be distributing this as a full package and Major upgrade, and we have the Major upgrade set to completely uninstall the old version first then install the new version.
So what condition should I put on this custom action?
Thank you.
Anyway, here's my situation. We've got an application that we're upgrading and the new version stores data differently. I've got a custom action that runs an InstallScript function to perform some operations to handle a data conversion from the old version's format to the new version's format.
I've made this a Commit execution (I only want to run after I know for sure that the new version is fully and properly installed), and placed it right after InstallFinalize in the Installation Execute sequence.
My real question is, I want to put a condition on this custom action so that it only runs during the INSTALL of the new version, and ONLY when UPGRADING from the old version (don't want it to run on just a new, clean install of the new version). I DON'T want it to run when uninstalling, patching, doing a repair/reinstall, etc.
We will be distributing this as a full package and Major upgrade, and we have the Major upgrade set to completely uninstall the old version first then install the new version.
So what condition should I put on this custom action?
Thank you.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 06, 2010
12:30 PM
In the upgrades section of the install project, there should be a field in your major upgrade entries to specify a property to set when detecting an older version. You can then check this property to condition your Custom Action.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 07, 2010
08:56 AM
Though less specific version-wise, when you are doing an upgrade, the IS_MAJOR_UPGRADE or IS_MINOR_UPGRADE property will be set. You probably want to use your upgrade view to specify the property to be set when a particular version of your software is being upgraded, as gbaltazar pointed out.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 07, 2010
05:47 PM
Thank you. I used IS_MAJOR_UPGRADE and it appears to be working.