Somesh Dhal
Somesh Dhal

Reputation: 396

What should be the Custom Action Condition if I only want it to run during Upgrade?

I create my msi using wix and now I have situation where I want to run my custom action only on upgrade from older version to newer version.I have tried UPGRADINGPRODUCTCODE as the condition but it does not work.

Upvotes: 0

Views: 60

Answers (1)

Michael Urman
Michael Urman

Reputation: 15905

UPGRADINGPRODUCTCODE is set in the context of the uninstallation of the prior version. What you are looking for is the property used as the Action Property of your Major Upgrade. It appears the MajorUpgrade element sets WIX_UPGRADE_DETECTED as well (perhaps as the action property).

Upvotes: 2

Related Questions