Adding a Control Event at the End of the Installation to Run Launch

Windows Installer

Adding a Control Event at the End of the Installation to Run Launch

The installer runs the sample's installation wizard sequence only if the full UI level is used to install the application. The last dialog box of the sample dialog sequence is an Exit Dialog named ExitDialog. When a user interacts with the OK button on ExitDialog, this first publishes an EndDialog ControlEvent that returns control to the installer. The control then publishes a DoAction ControlEvent that runs the Launch custom action. Each control event requires a record in the ControlEvent table. See ControlEvent Overview.

ControlEvent Table

Dialog Control_ Event Argument Condition Ordering
ExitDialog OK EndDialog Return 1 1
ExitDialog OK DoAction Launch NOT Installed AND $Tutorial=3 2

 

The condition on the DoAction control ensures the custom action only runs during the first installation of the application and that it is being installed locally. The phrase $Tutorial=3 means the action state of the Tutorial component is set to local. See Conditional Statement Syntax.

This completes the sample.


Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.