Reputation: 41
I have an action that has to be executed when unistalling but not when updating the product to a new version.
I have defined the UpgradeVersion like this:
<UpgradeVersion OnlyDetect="no" Property="PREVIOUSFOUND"
Minimum="1.0.0" IncludeMinimum="yes"
Maximum="$(var.Version)" IncludeMaximum="no"/>
and this is the Custom action and its Condition:
<Custom Action="DOSTUFF" Before="RemoveFiles" Condition='(REMOVE="ALL") And (NOT PREVIOUSFOUND)'/>
Despite this, the action still fires when running the .msi with a higher version (e.g.: 1.0.0 -> 1.0.1).
I've also tried defining the PREVIOUSFOUND
property like this: <Property Id="PREVIOUSFOUND" Secure="yes"></Property>
to no avail.
I expected the action to run only when uninstalling from the Control Panel Apps & Features and not when updating the program to a higher version.
Upvotes: 1
Views: 920