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

Custom Action Type 39

· 52CE 我爱测

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

The Custom Action Type 39 is used with concurrent installations. Concurrent installations are not recommended for the installation of applications intended for release to the public. For information about concurrent installations please see Concurrent Installations.

Type 39 custom action installs an application that is advertised or already installed. This custom action type may be used to reinstall or remove a product that has been installed as a concurrent installation by the current product's installation package. The Type 39 custom action cannot be used to reinstall or remove any product previously installed by any other means. For example, if the secondary product is installed using a Type 39, Type 23, or Type 7 custom action during the installation of the primary product, a Type 39 custom action may be used to remove the secondary product when the primary product is uninstalled.

Source

The Source field of the CustomAction table contains the product code for the application.

Numeric Type

Type name Value
msidbCustomActionTypeInstall + msidbCustomActionTypeDirectory 39

Target

The Target field of the CustomAction table contains property settings that are to be passed to the concurrent installation. These property settings can specify features.

Return Processing Options

The custom action type 39 fails if the application is not advertised or installed. To avoid this failure, you must set the msidbCustomActionTypeContinueflag.

A concurrent install cannot run asynchronously.

See Custom Action Return Processing Options.

Execution Scheduling Options

Options flags are available to control the potential multiple execution of custom actions. See Custom Action Execution Scheduling Options.

In-Script Execution Options

The custom action does not use this option.

Return Values

The return status of user exit, failure, suspend, or success from a concurrent installation is processed in the same way as any other action. Note however that Windows Installer translates the return values from all actions when it writes the return value into the log file. For example, if the action return value appears as 1 in the log file, this means that the action returned ERROR_SUCCESS. For more information, see Logging of Action Return Values.

Note that if a concurrent installation has msidbCustomActionTypeContinue set, then a return of ERROR_INSTALL_USEREXIT, ERROR_INSTALL_REBOOT, ERROR_INSTALL_REBOOT_NOW, or ERROR_SUCCESS_REBOOT_REQUIRED is treated as ERROR_SUCCESS. This means that if you set msidbCustomActionTypeContinue and your concurrent installation requires a restart, the requirement for the restart will be ignored. Additionally, the error code from the concurrent installation custom action will be ignored.

If msidbCustomActionTypeContinue is not set, the following return codes plus ERROR_SUCCESS are treated as success and have the following meanings. Other return codes are treated as failure.

Message Meaning
ERROR_INSTALL_REBOOT The restart flag will be set to restart at end of the installation.
ERROR_INSTALL_REBOOT_NOW A restart is required before completing the installation. The restart will be processed immediately.
ERROR_SUCCESS_REBOOT_REQUIRED A restart was required, but was suppressed.

Remarks

A conditional expression is required to enable the concurrent installation at either installation or removal of the associated component or feature.

Related topics

Concurrent Installations

Custom Action Reference

About Custom Actions

Using 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)

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

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