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

Custom Action Type 51

· 52CE 我爱测

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

This custom action sets a property from a formatted text string.

To affect a property used in a condition on a component or feature, the custom action must come before the CostFinalize action in the action sequence.

Source

The Source field of the CustomAction table can contain either the name of a property or a key to the Property table. This property is set by the formatted string in the Target field using MsiSetProperty.

Type Value

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

Constants Hexadecimal Decimal
msidbCustomActionTypeTextData + msidbCustomActionTypeProperty 0x033 51

Target

The Target column of the CustomAction table contains a text string formatted using the functionality specified in MsiFormatRecord (without the numeric field specifiers). Parameters to be replaced are enclosed in square brackets, […], and may be properties, environment variables (% prefix), file paths (# prefix), or component directory paths ($ prefix).

Return Processing Options

The custom action does not use these 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

The custom action does not use these options.

Return Values

See Custom Action Return Values.

Remarks

If you set a private property in the UI sequence by authoring a custom action in one of the user interface sequence tables, that property is not set in the execution sequence. To set the property in the execution sequence, you must also put a custom action in an execution sequence table. Alternatively, you can make the property a public property and include it in the SecureCustomProperties property.

Related topics

Custom_Actions

Formatted Text 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)

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

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