[wix-devs] Custom action at cancel uninstallation

Denis Reinoso reinoso.denis at gmail.com
Wed Feb 22 11:29:21 PST 2017

Hello, my question is:

How to define a custom action to execute when the cancel button (at
uninstallation) is pressed in WiX Toolset?

I have found that the cancel button should be defined like this:

    <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
Height="17" Cancel="yes" Text="Cancel">
        <Publish Event="SpawnDialog" Value="CancelButton"/>

And a publish event is defined to the custom action, which could be defined

    <CustomAction Id="CancelButton" Execute="immediate"
ExeCommand='Program.exe"   Return="ignore"/>

An error shows up:  **Unresolved reference to symbol

A Dialog element in WiX cannot have a custom action as child, so where
should be defined that custom action?

Two links with related information:

 - [How to cancel an uninstallation using CancelDlg][1]
 - [Custom Action as event][2]


*Denis Reinoso*
Computer Engineer

*Cordoba, ArgentinaMobile: +54 - 351 - 786 1418(AR) Skype:  denis.reinoso*

More information about the wix-devs mailing list