WuInstall is part of the XEOX family. XEOX manages patches, software and remote access for Windows, macOS and Linux in one web console. Discover XEOX

  1. Documentation
  2. WuInstall

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 2.9.x 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, whether or not a reboot is needed. Only a failed run (for example a failed search or installation) prevents the reboot; WuInstall then returns the error code. Can also be used standalone: wuinstall /reboot

If initiating the reboot fails, WuInstall logs the Windows error message and exits with code 6:

Reboot failed, Error: <Windows error message>


/reboot_if_needed [nseconds]

Works like /reboot, but only reboots when the updates installed in this run require a reboot. It applies only together with /install (or /install_cache); otherwise WuInstall ignores it. A reboot that was already pending before the run does not trigger it.

If a reboot is needed:

Rebooting after 10 seconds ... (WuInstall 2.9.x prints reboot_if_needed specified, rebooting first)

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 2.9.x 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 — except in the last run, when the maximum number of reboot cycles is reached: that run does not reboot and returns 10 if a reboot is still required. 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. When it schedules the next run, WuInstall returns 15 (16 if the task could not be scheduled).

Differences in WuInstall 3:

  • From 3.0.2 on, the task is created disabled and enabled only right before the restart starts, so a run that is stopped before the restart (for example by an RMM timeout) leaves no task that would start WuInstall at the next boot. If the task cannot be enabled, WuInstall returns 16 and restarts anyway.
  • The task also starts when the machine runs on battery; WuInstall 2.9.x creates it with the Task Scheduler defaults, under which it does not.
  • Combined with /uninstall, WuInstall 3 reboots when the uninstallation requires it; WuInstall 2.9.x reboots after /uninstall only with /reboot.
  • From WuInstall 3.0.5 on, the task holds no user names or passwords (/proxyuser, /proxypass, /smtpUser, /smtpPassword), whether they come from the command line or from an /options file (the task holds the switches read from the file, not /options <file>). In their place it holds @WuInstallProtected. The values are kept encrypted for the machine in the registry key HKLM\SOFTWARE\WuInstall\RebootCycle, which only SYSTEM and administrators can read, and are deleted together with the task; the next run reads them back before it does anything else. WuInstall 3.0.0 to 3.0.4 wrote them into the task in clear text, also with /masksensitivedata. WuInstall 2.9.x wrote them in clear text too, and with /masksensitivedata the masked text, so the later runs could not log on.

/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 whether or not updates were installed; only a failed run (for example a failed search or installation) prevents it. Combined with /reboot_if_needed, WuInstall reboots when the installed updates require it and shuts down otherwise.

At the start, WuInstall 2.9.x displays:

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

After completion:

WuInstall will shutdown system after 10 seconds ...

If the shutdown was initiated successfully, WuInstall returns the normal result code of the run (for example 0, 2 or 10), not 5. If initiating the shutdown fails, it logs the Windows error message and exits with code 6.


/reboot_message "message"

Displays a custom message in the reboot dialog. Default message: "WuInstall reboot" (none with /reboot_if_needed).


/shutdown_message "message"

Displays a custom message in the shutdown dialog. Default message: "WuInstall shutdown". /reboot_message and /shutdown_message set the same message, which WuInstall shows in whichever dialog it opens, so give only one of them.

Read as Markdown

Updated