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

Custom Action Type 34

· 52CE 我爱测

Developers of Windows Installer packages may choose to use a custom action type 34 when the standard actions are insufficient to execute the installation.

This custom action calls an executable launched with a command line. For more information, see Executable Files.

Source

The executable is generated from a file. The Source field of the CustomAction table contains a key into the Directory table. The referenced Directory table entry is used to resolve the full path to a working directory. This is not required to be the path to the directory containing the executable.

Type Value

Include the following value in the Type column of the CustomAction table to specify the basic numeric type.

Constants Hexadecimal Decimal
msidbCustomActionTypeExe + msidbCustomActionTypeDirectory 0x022 34

Target

The Target column of the CustomAction table contains the full path and name of the executable file followed by optional arguments to the executable. The full path and name to the executable file is required. Quotation marks must be used around long file names or paths. The value is treated as formatted text and may contain references to properties, files, directories, or other formatted text attributes.

Return Processing Options

Include optional flag bits in the Type column of the CustomAction table to specify return processing options. For a description of the options and the values, see Custom Action Return Processing Options.

Execution Scheduling Options

Include optional flag bits in the Type column of the CustomAction table to specify execution scheduling options. These options control the multiple execution of custom actions. For a description of the options, see Custom Action Execution Scheduling Options.

In-Script Execution Options

Include optional flag bits in the Type column of the CustomAction table to specify an in-script execution option. These options copy the action code into the execution, rollback, or commit script. For a description of the options, see Custom Action In-Script Execution Options.

Return Values

Custom actions that are executable files must return a value of 0 for success. The installer interprets any other return value as failure. To ignore return values set the msidbCustomActionTypeContinue bit flag in the Type field of the CustomAction table.

Remarks

A custom action that launches an executable takes a command line, which commonly contains properties that are designated dynamically. If this is also a deferred execution custom action, the installer uses CreateProcessAsUser or CreateProcess to create the process when the custom action is invoked from the installation script.

Related topics

Custom_Actions

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)

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

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