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

Custom Action Type 37

· 52CE 我爱测

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

This custom action is written in JScript, such as ECMA 262. Windows Installer does not support JScript 1.0. For more information, see Scripts.

Source

The Source field of the CustomAction table contains the null value. The script code for the custom action is stored as a string of literal script text in the Target field.

Type Value

Include the following value in the Type column of the CustomAction table to specify the basic numeric type of a 32-bit custom action.

Constants Hexadecimal Decimal
msidbCustomActionTypeJScript + msidbCustomActionTypeDirectory 0x025 37

Windows Installer may use 64-bit custom actions on 64-bit operating systems. A 64-bit custom action based on scripts must include the msidbCustomActionType64BitScript bit in its numeric type. For information see 64-bit Custom Actions. Include the following value in the Type column of the CustomAction table to specify the basic numeric type of a 64-bit custom action.

Constants Hexadecimal Decimal
msidbCustomActionTypeJScript + msidbCustomActionTypeDirectory + msidbCustomActionType64BitScript 0x0001025 4133

Target

The Target field of the CustomAction table contains the script code for the custom action as a string of literal script text.

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

This custom action type always returns success.

Remarks

A custom action that is written in JScript or VBScript requires the install Session object. The installer attaches the Session Object to the script with the name "Session". Because the Session object may not exist during an installation rollback, a deferred custom action written in script must use one of the methods or properties of the Session object described in the section Obtaining Context Information for Deferred Execution Custom Actions to retrieve its context.

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)

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

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