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
- :
- custom action condition being ignored during a 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
Mar 11, 2013
12:28 PM
custom action condition being ignored during a major upgrade
IS 2012 Spring professional, Basic MSI.
I have a custom action that runs if a property does not exist.
Install Exe Condition = Not PROPERTYNAME
So by default, it runs during an installation and an uninstallation and a major upgrade.
Because normally, the property is not set. Cuz we want it to run.
Now, I have the need to prevent this CA from running during a major upgrade.
I thought I might do so by simply adding the following, to the command line.
PROPERTYNAME=1
And indeed this works during an installation or an uninstallation.
In that, if PROPERTYNAME=1 is on the command line, the custom action does not run.
And if PROPERTYNAME=1 is missing from the command line, the custom action does run.
However, I have found that PROPERTYNAME=1 is ignored during a major upgrade.
In that, my custom action runs regardless of if PROPERTYNAME=1 is present on the command line or not.
I also tried, adding an upgrade entry.
Media\Upgrades.
Specifying PROPERTYNAME as the "Detect Property" and with "Detect Only" set to "Yes".
A verbose log shows, that PROPERTYNAME is being set to a value equal to property code of the detected setup.
So, methinks the Upgrade entry, is doing what it is supposed to do.
But, the custom action still runs.
Cuz the CA is not recognizing that PROPERTYNAME is set (to any value) during a major upgrade.
So, I was wondering what I need to do in order to get my custom action to recognize a property, during a major upgrade.
Thanks for looking at this.
I have a custom action that runs if a property does not exist.
Install Exe Condition = Not PROPERTYNAME
So by default, it runs during an installation and an uninstallation and a major upgrade.
Because normally, the property is not set. Cuz we want it to run.
Now, I have the need to prevent this CA from running during a major upgrade.
I thought I might do so by simply adding the following, to the command line.
PROPERTYNAME=1
And indeed this works during an installation or an uninstallation.
In that, if PROPERTYNAME=1 is on the command line, the custom action does not run.
And if PROPERTYNAME=1 is missing from the command line, the custom action does run.
However, I have found that PROPERTYNAME=1 is ignored during a major upgrade.
In that, my custom action runs regardless of if PROPERTYNAME=1 is present on the command line or not.
I also tried, adding an upgrade entry.
Media\Upgrades.
Specifying PROPERTYNAME as the "Detect Property" and with "Detect Only" set to "Yes".
A verbose log shows, that PROPERTYNAME is being set to a value equal to property code of the detected setup.
So, methinks the Upgrade entry, is doing what it is supposed to do.
But, the custom action still runs.
Cuz the CA is not recognizing that PROPERTYNAME is set (to any value) during a major upgrade.
So, I was wondering what I need to do in order to get my custom action to recognize a property, during a major upgrade.
Thanks for looking at this.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 11, 2013
05:00 PM
During a major upgrade, uninstallation of previous version and installation of current version happen. From your description, the custom action is probably run during uninstallation of previous version.
To determine if it is removed by an upgrade, one can use UPGRADINGPRODUCTCODE Property.
To determine if it is removed by an upgrade, one can use UPGRADINGPRODUCTCODE Property.