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

Using a Custom Action to Launch an Installed File at the End of the Installation

· 52CE 我爱测

The following example illustrates how to launch an HTML file at the end of an installation.

The following example illustrates how to launch an HTML file at the end of an installation. The Installer installs the component that contains the file, and then publishes a control event at the end of the installation to run a custom action that opens the file. This approach may be used to launch a help tutorial at the end of the first installation of an application.

The sample must meet the following specifications.

  • The Installer executes the custom action only if the full UI level is used to install an application.
  • The Installer executes the custom action only if the component that contains the HTML file is installed to run locally on the computer.
  • The custom action only runs on the first installation of the application.
  • The installation does not fail if the custom action fails.

The sample includes a hypothetical component named Tutorial that controls at least one resource, a file named tutorial.htm. The identifier for this file in the File column of the File table is Tutorial. The following discussion assumes that you have already created the resources required by Tutorial, and have made all the necessary entries in the Feature, Component, File, Directory, and FeatureComponents tables to install this component. For more information, see An Installation Example.

The following topics contain information about how to create required custom actions and add them to an installation package.

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)

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

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