O'Reilly logo

WiX 3.6: A Developer's Guide to Windows Installer XML by Nick Ramirez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Publish events

In the following sections, we'll take a look at several events that you can publish. This should give you a good idea about how the Publish element works.

DoAction

The DoAction event calls a custom action that you've declared elsewhere in your markup. For example, suppose we'd defined a custom action called CA_ShowMessage that simply displays a message box with the text You clicked?:

<CustomAction Id="CA_ShowMessage"
              Script="vbscript" 
              Execute="immediate">
   <![CDATA[msgbox "You clicked?"]]>
</CustomAction>

We could then trigger this action with a PushButton by publishing the DoAction event with a value of CA_ShowMessage.

<Control Id="DoActionButton" Type="PushButton" X="120" Y="100" Width="56" Height="17" Text="Click Me!"> <Publish Event="DoAction" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required