MsiServiceConfigFailureActions 表MsiServiceConfigFailureActions Table

MsiServiceConfigFailureActions 表列出了在服务失败之后要运行的操作。The MsiServiceConfigFailureActions table lists operations to be run after a service fails. 此表中指定的操作将在系统下一次启动时运行。The operations specified in this table run the next time the system is started.

Windows Installer 4.5 或更早版本 不支持。Windows Installer 4.5 or earlier: Not supported. 此表从 Windows Installer 5.0 开始可用。This table is available beginning with Windows Installer 5.0.

MsiServiceConfigFailureActions 表包含以下列。The MsiServiceConfigFailureActions table has the following columns.

Column 类型Type Key NullableNullable
MsiServiceConfigFailureActionsMsiServiceConfigFailureActions 标识符Identifier YY NN
名称Name Formatted NN NN
事件Event 整数Integer NN NN
ResetPeriodResetPeriod 整数Integer NN YY
RebootMessageRebootMessage Formatted NN YY
CommandCommand Formatted NN YY
“操作”Actions 文本Text NN YY
DelayActionsDelayActions 文本Text NN YY
组件_Component_ 标识符Identifier NN NN

Columns

MsiServiceConfigFailureActionsMsiServiceConfigFailureActions

这是此表中标识失败操作的主键。This is the primary key of this table that identifies a failure action.

路径名Name

此列包含属于此包或已经安装的服务的名称。This column contains the name of a service that is a part of this package or that is already is installed.

引发Event

此列指定更改服务配置的时间。This column specifies when to change the service's configuration. 以下值是可以组合以表示多个操作的位域。The following values are bit fields that can be combined to represent multiple operations. 任何其他位字段值将被忽略。Any other bit field values are ignored.

返回的常量Constant 描述Description
msidbServiceConfigEventInstall 1msidbServiceConfigEventInstall 1
在组件的安装过程中进行更改。Change during installation of the component.
msidbServiceConfigEventUninstall 2msidbServiceConfigEventUninstall 2
组件卸载过程中的更改。Change during uninstallation of the component.
msidbServiceConfigEventReinstall 4msidbServiceConfigEventReinstall 4
组件重新安装过程中的更改。Change during re-installation of the component.

ResetPeriodResetPeriod

服务失败计数的重置时间段(以秒为单位)。The reset period in seconds of service's failure count. 服务控制管理器 (SCM) 计算自上次重新启动系统以来每个服务发生故障的次数。The Service Control Manager (SCM) counts the number of times each service has failed since the system was last restarted. 如果服务在重置期限内未失败,则计数将重置为零。The count is reset to zero if the service does not fail for the reset period. 如果服务第 n 次失败,系统将执行在 [ ] "操作" 字段中指定的数组的元素 N-1 中指定的操作。When the service fails for the Nth time, the system performs the action specified in the element [N-1] of the array specified in the Actions field.

将 ResetPeriod 字段留空以指示绝不应重置失败计数。Leave ResetPeriod field empty to indicate that failure count should never be reset.

RebootMessageRebootMessage

在重新启动计算机之前发送给用户的消息,以响应 "操作" 列中指定的 SC _ 操作 _ 重新启动 操作。The message sent to users before restarting the computer in response to a SC_ACTION_REBOOT action specified in the Actions column. 您可以使用空字符串 "" 来发送未更改的当前消息。You can use an empty string, "", to send the current message unchanged. 您可以使用 [ ~ ] 带格式的数据类型的语法来删除当前消息,而不发送任何消息。You can use [~] syntax of the Formatted data type to delete the current message and send no message.

CommandCommand

CreateProcess 函数创建的进程运行的命令行,以响应 "操作" 列中指定的 SC _ 操作 _ 运行 _ 命令 操作。The command line run by the process created by the CreateProcess function in response to a SC_ACTION_RUN_COMMAND action specified in the Actions column. 新进程将在与服务相同的帐户下运行,并且仅当操作字段为 SC _ 操作 _ 运行 _ 命令 时才运行。The new process runs under the same account as the service and only if the Action field is SC_ACTION_RUN_COMMAND. 您可以使用空字符串 "" 来使用未更改的当前命令行。You can use an empty string, "", to use the current command line unchanged. 您可以使用 [ ~ ] 带格式的数据类型的语法来删除当前命令行,并且在服务失败时不运行操作。You can use [~] syntax of the Formatted data type to delete the current command line and run no operation when the service fails.

执行Actions

此字段包含整数值的数组,这些整数值指定 SCM 在服务失败时所采取的操作。This field contains an array of integer values that specify the actions taken by the SCM if the service fails. 用分隔数组中的值 [ ~ ] 。Separate the values in the array by [~]. 数组的第 n 个元素中的整数值指定在第 n 次服务失败时执行的操作。The integer value in the Nth element of the array specifies the action performed when the service fails for the Nth time. 数组的每个成员都是以下整数值之一。Each member of the array is one of following integer values.

返回的常量Constant 描述Description
SC _操作 _ NONE 0SC_ACTION_NONE 0
不执行任何操作。No action.
SC __重新启动操作 2SC_ACTION_REBOOT 2
重新启动计算机。Restart the computer.
SC _操作 _ 重新启动 1SC_ACTION_RESTART 1
重启服务。Restart the service.
SC _操作 _ 运行 _ 命令 3SC_ACTION_RUN_COMMAND 3
运行命令。Run a command.

DelayActionsDelayActions

此字段包含整数值的数组,这些整数值指定在执行 "操作" 列中指定的操作之前要等待的时间(以毫秒为单位)。This field contains an array of integer values that specify the time in milliseconds to wait before performing the action specified in the Action column. 用分隔数组中的值 [ ~ ] 。Separate the values in the array by [~]. DelayActions 数组中的元素数必须等于 Actions 数组中的元素数。The number of elements in the DelayActions array must be equal to the number of elements in the Actions array. DelayActions 数组的第 n 个元素指定操作数组的第 n 个元素的时间延迟。The Nth element of the DelayActions array specifies the time delay for the nth element of the Actions array.

组件_Component_

组件表的第一列的外部键。External key to column one of the Component Table.

验证Validation

ICE102ICE102
ICE03ICE03
ICE06ICE06
ICE32ICE32
ICE45ICE45
ICE46ICE46
ICE69ICE69