How can I perform a custom action in WiX that only executes on install or uninstall?

前端 未结 2 762
一个人的身影
一个人的身影 2021-02-12 20:06

I have two custom actions, one of which I\'d like to execute when my product is installed and the other when it is uninstalled.

My custom action is currently called from

相关标签:
2条回答
  • 2021-02-12 20:37

    The variable “INSTALLED” should be using is “Installed”. Find more information regarding the Install and uninstall conditions in the Stack Overflow answer How to add a WiX custom action that happens only on uninstall (via MSI)?.

    0 讨论(0)
  • 2021-02-12 20:53

    Try next
    1. Only for Installation:

    <InstallExecuteSequence>
    <Custom Action="SomeAction" After="InstallFinalize">NOT Installed AND NOT REMOVE</Custom>
    </InstallExecuteSequence>
    

    2. For Uninstall try to use: Rob's answer

    UPGRADINGPRODUCTCODE property is set only during RemoveExistingProducts CA.

    0 讨论(0)
提交回复
热议问题