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

ScheduleReboot Action

· 52CE 我爱测

Insert the ScheduleReboot action into the action sequence to prompt the user for a restart of the system at the end of the installation. Use the ForceReboot action to prompt for a restart during installation.

Insert the ScheduleReboot action into the action sequence to prompt the user for a restart of the system at the end of the installation. Use the ForceReboot action to prompt for a restart during installation.

If the installation has a user interface, the installer displays a message box and button at the end of installation asking whether the user wants to restart the system. The user must respond to this prompt before completing installation. If the installation has no user interface, the system automatically restarts at the end.

If the installer determines that a restart is necessary it automatically prompts the user to restart at the end of the installation, whether or not there are any ForceReboot or ScheduleReboot actions in the sequence. For example, the installer automatically prompts for a restart if it needs to replace any files that are in use during installation.

You can suppress certain prompts for restarts by setting the REBOOT property.

If the Windows Installer encounters the ForceReboot or ScheduleReboot action during a multiple-package installation, the installer will stop and roll back the installation. Other packages belonging to the multiple-package installation, that do not contain a ForceReboot or ScheduleReboot action, can be installed.

Sequence Restrictions

There are no sequence restrictions.

ActionData Messages

There are no ActionData messages.

Remarks

For example, this action can be used to force the installer to prompt for a restart after installing drivers that require a restart. If the installer attempts to replace files that are in use, it automatically prompts the user to restart even if ScheduleReboot has not been used.

The ScheduleReboot action is typically placed at the end of the sequence, but it can be inserted at any point in the sequence.

Related topics

System Reboots

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)

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

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