User Guide

504
Launching a Custom Action from a Dialog
Launching a Custom Action from a Dialog
You can use a control on a dialog to launch a custom action. Example: You can set a
button so that if the end user clicks it, the custom action runs.
1. Select MSI Script.
2. From Installation Mode, select All Custom Actions.
3. Create a new custom action and configure it normally, but mark No Sequence on
the Location tab.
The action is not added to any sequence.
4. In Setup Editor > Dialogs tab, right-click a dialog and select Add > Button.
Make sure the button is not on top of a graphic. You can add other controls besides
buttons.
5. On the Control tab of the button’s Properties dialog, enter the label for the button in
the Control Text list box.
6. On the Events tab, in the Publish Events group box, click Add and complete the
dialog:
Event
Select DoAction.
•Argument
Enter the name of the custom action. The name is case-sensitive.
When the installation is run, the button you added appears on a dialog. When the end
user clicks the button, the custom action you specified is run.