Reboot / Shutdown Options

/reboot [nseconds]

Initiates a system reboot with a delay of the specified number of seconds after WuInstall finishes. If no time is specified, 10 seconds are used by default.

At the start of execution, WuInstall displays:

/reboot specified, system reboots after WuInstall with 10 seconds delay

After execution completes:

Rebooting after 10 seconds ...

WuInstall exits with return code 5 and the system reboots after the specified delay in any case, regardless of the outcome. Can also be used standalone: wuinstall /reboot

If initiating the reboot fails, an error code is displayed and WuInstall exits with code 6:

Reboot failed, Error Code: 1271


/reboot_if_needed [nseconds]

Works identically to /reboot, but only triggers a reboot when one is actually required (return code 10 or 11).

If a reboot is needed:

reboot_if_needed specified, rebooting

If no reboot is needed:

no reboot needed, so system will not reboot ...


/rebootcycle [ntimes]

Installs updates with automatic reboots in between. After a successful update and reboot, WuInstall starts again and re-executes the previous command. At startup WuInstall prints:

/rebootcycle specified, going to run this wuinstall command at most x times again at startup if reboot is triggered

Use together with /reboot or /reboot_if_needed. If neither is specified, /reboot_if_needed is used by default. Set the maximum number of reboot cycles with ntimes (default: 3):

wuinstall /install /reboot_if_needed /rebootcycle 4

WuInstall uses the Windows Task Scheduler to execute the command before user login.


/reboot_force [nseconds]

Forces a reboot after WuInstall finishes, regardless of whether a reboot is needed. Open programs are forced to close.


/reboot_if_needed_force [nseconds]

Combination of /reboot_if_needed and /reboot_force — only reboots if required, but when it does, it forces all programs to close.


/shutdown [nseconds]

Similar to /reboot, but shuts the system down instead of rebooting. Default delay is 10 seconds. The shutdown happens in any case, regardless of the WuInstall result.

At the start:

/shutdown specified, system shuts down after WuInstall with 10 seconds delay

After completion:

Shutdown after 10 seconds ...

If the shutdown was initiated successfully, WuInstall exits with code 5. Otherwise it displays an error code and exits with code 6.


/reboot_message "message"

Displays a custom message in the reboot dialog. Default message: "WuInstall reboot".


/shutdown_message "message"

Displays a custom message in the shutdown dialog. Default message: "WuInstall shutdown".

Did this answer your question?
😞
😐
🤩

Last updated on January 3, 2024