cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RayKode
Level 6

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.
Labels (1)
0 Kudos
(1) Reply
TsungH
Level 12

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.
0 Kudos