大网数据广告活动
安装更新与部署

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

· 52CE 我爱测

The installer runs the sample's installation wizard sequence only if the full UI level is used to install the application.

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.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。