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

Other Options

/autoaccepteula

Automatically accepts all EULAs required by updates before installation, enabling fully unattended operation. WuInstall 2.9.x and 3 do this by default, also without the switch. Requires WuInstall to be running under an administrator or power user account.


/logfile "<path>"

Logs all console output to the specified file. Each line is prefixed with a timestamp:

wuinstall /search /logfile "C:\logs\WuInstall.txt"

2026/10/21-15:29:04  Searching for updates (criteria: IsInstalled=0 and Type='Software') ...
2026/10/21-15:29:06  4 update(s) found in total, filtering ...
2026/10/21-15:29:06  4 update(s) found:
2026/10/21-15:29:06     1. KB890830 Windows Malicious Software Removal Tool x64 - v5.146 (KB890830)

This is the output of WuInstall 3. WuInstall 2.9.x words its lines differently (e.g. Searching for updates ... Criteria: ..., Result Code: Succeeded). Scripts should evaluate the exit code or the /xmlout report rather than the log text.

Filename variables — supported in both versions by /logfile, /logfile_append, /xmlout and /xmloutWithBOM, and in WuInstall 3 also by /jsonout. The names are case-sensitive:

Variable Description Example result
$DATETIME$ Current date and time 2022-05-28_09_43_45_WuInstall.txt
$RCC$ Current reboot cycle count (use with /rebootcycle) 3_WuInstall.txt → 2_WuInstall.txt → 1_WuInstall.txt → 0_WuInstall.txt
$COMPUTERNAME$ Computer name SRV01_WuInstall.txt
wuinstall /search /logfile "C:\logs\$DATETIME$_WuInstall.txt"
wuinstall /install /rebootcycle 3 /logfile "C:\logs\$RCC$_WuInstall.txt"

/logfile_append "<path>"

Same as /logfile but appends to an existing file instead of overwriting it. Useful for accumulating logs across multiple runs or reboot cycles.

/log_as_ansi

Forces ANSI encoding for the log file. Must be combined with /logfile or /logfile_append.

/autocreatelogfilepath

Creates the folder for the log file and the report (/logfile, /logfile_append, /xmlout; in WuInstall 3 also /jsonout) if it does not exist.


/maxruntime <minutes>

Sets a hard timeout — WuInstall exits with code 12 if the operation has not completed within the specified number of minutes, regardless of progress:

Maxruntime timeout elapsed: 5, exiting process!

⚠️ When /maxruntime ends the run, WuInstall restores the WSUS settings changed by /use_wsus or /bypass_wsus. If the WuInstall process is killed from outside (e.g. by Task Manager or an RMM timeout), WuInstall 3.0.4 and later restore these settings — and a proxy disabled with /disable_winhttp_proxy or /disable_internet_proxy — at the start of the next WuInstall run, and at once on Ctrl+C or when the console window is closed; WuInstall 2.9.x and 3.0.0 to 3.0.3 do not restore them.


/simple_error

Normalizes return codes to a simple binary: 0 for success, 1 for error — useful for scripts that only need pass/fail.

Returns 0 Returns 1
Codes 0, 2, 3, 5, 10, 15 Codes 1, 4, 6, 8, 11, 16, 17

A /maxruntime timeout still returns 12, and a command-line syntax error (e.g. an unknown switch) still returns 7.


/extended_error

Returns a bitmask exit code for granular script logic. Bits are additive:

Bit Value Meaning
0 1 An error occurred
1 2 Updates found matching the filter
2 4 Updates found
3 8 maxUpdateCount was reached
4 16 Reboot required
5 32 Timeout reached
6 64 Invalid criteria specified
7 128 Command line syntax error
8 256 Invalid license
9 512 Insufficient disk space

A command-line syntax error (e.g. an unknown switch) still returns a plain 7 — do not read it as bits 1 + 2 + 4.


/show_progress

Displays per-update download and installation progress using asynchronous callbacks.

⚠️ Not recommended for automated scripts or production deployments — may cause issues on some machines. Use only for manual testing and debugging.


/offline

Prevents WuInstall from connecting to WSUS or Windows Update. Instead, searches the locally cached update list. Triggered automatically by /criteria "IsInstalled=1" and by /uninstall without /criteria.

wuinstall /search /criteria "IsInstalled=1" /offline /match "KB982214"


/quiet

Forces the update installer to run without any user interaction dialogs.

/disableprompt

Suppresses source prompts during update installation.

/silent

Suppresses the console output; the log file still receives every line. /third_party_progress lines and the /info output are still printed. In WuInstall 2.9.x this switch has no effect.

/ignore_unknown_options

Logs unknown switches and ignores them instead of stopping with exit code 7.

/masksensitivedata

Masks sensitive values such as user names, passwords and domains (e.g. /smtpPassword, /proxypass) in the log and the XML report. WuInstall 3 masks every spelling of a switch (/opt, -opt, --opt, with a space or =) and also switches read from an /options file.

/donothing [retcode]

Takes no action and returns the specified exit code (default: 0). Useful for testing script logic. WuInstall 3 returns exactly the code you specify (only an /xmlout report that cannot be written turns it into 1, or 11 with a reboot pending); WuInstall 2.9.x returned 2 instead in most cases.


/validate [text|json]

WuInstall 3.1 and later. Checks the other switches on the command line — or the /options file they name — the way a run reads them, without running anything: no log file, no report, no Windows Update call, and none of the clean-up a run starts with. It lists every error a run would stop at (a run logs only the first), switches that behave differently from 2.9.x, report folders that do not exist on this machine, pattern files that cannot be read, abbreviated switch names and credentials the log would show, and prints the command line as WuInstall reads it, with full switch names and masked credentials. It returns 0 when a run would accept the command line and 7 when not. /validate json prints the same as JSON.

wuinstall /validate /install /nomatchfile C:\WuInstall\DoNotInstall.txt /reboot_message arg "Restart after patching" /logfile C:\WuInstall\wuinstall.log
WuInstall 3.1.0 /validate: valid (0 error(s), 1 warning(s), 0 note(s))
Effective command line: /install /nomatchfile C:\WuInstall\DoNotInstall.txt /reboot_message arg /logfile C:\WuInstall\wuinstall.log
warning stray_argument            "Restart after patching" is not a switch or the value of one, and a run ignores it.
Exit code: 0

Here WuInstall takes arg as the restart message and ignores the text in quotes, as WuInstall 2.9.x does. Run /validate before you roll out a new command line or /options file.

/capabilities

WuInstall 3.1 and later. Prints every switch of this WuInstall as JSON and runs nothing else: its names, its value and default, what it does, whether it is an action, what it changes on the machine (installs updates, restarts the machine, registers a scheduled task, …), whether it is supported, ignored or deprecated, the version that added it, and the return codes. For scripts, RMM recipes and AI assistants that need to know what the installed version accepts.


/xmlout "<path>"

Writes a detailed XML report to the specified file, including system info, WSUS configuration, matched updates with full metadata, and the overall result. Supports filename variables ($DATETIME$, $RCC$, $COMPUTERNAME$). If the report cannot be written, WuInstall returns 1 (11 if a reboot is pending).

/xmloutWithBOM "<path>"

Same as /xmlout, but the file starts with a UTF-8 byte order mark (BOM).

/jsonout "<path>"

WuInstall 3 only. Writes the report as JSON to the specified file — in addition to or instead of /xmlout. Supports filename variables ($DATETIME$, $RCC$, $COMPUTERNAME$). From WuInstall 3.0.5 on, a JSON report that cannot be written makes the run an error (exit code 1, or 11 with a pending reboot), as with /xmlout. From WuInstall 3.1 on the report starts with schema_version 2 and also names the updates the filters left out and why the run ended; see reports and exit codes.

/query_history

Appends the full update installation history to the XML report. Requires /xmlout or /info, and /search, /download or /install. May produce very large output on Windows 7 and older systems.

/info

Prints the XML report to the console after WuInstall has finished. Can be used standalone without a core switch; the report then contains the system information only.


/includeRecommendedUpdates

Has no effect. WuInstall sets the Windows Update option for recommended updates without saving it (WuInstall 2.9.x as well), so the search finds the same updates with and without the switch. The switch is still accepted, so existing command lines keep working.

/IncludePotentiallySupersededUpdates 0|1

Controls whether potentially superseded updates are included in results.


/targetgroup "<group>"

Assigns the machine to a WSUS client-side targeting group for the duration of the WuInstall run. Allows update deployment to be scoped to specific computer groups defined in WSUS.


/offlinescan "<path-to-cab>"

Scans for updates against a local .cab file instead of WSUS or Windows Update. Useful for updating machines with no internet or WSUS access. The .cab file must be on a local path — UNC paths are not supported. Combine with /install_cache to supply the actual update packages. Requires administrator privileges. If the .cab file is missing or cannot be registered, WuInstall 3 ends the run with an error (exit code 1) and does not search online. WuInstall 2.9.x stops without searching as well, but returns 2 (no more updates available) without an error.


/options [file://|http://]<path>

Loads WuInstall options from an external file (one option per line), either from disk or a URL. Useful for centralizing and reusing configuration across machines. Both versions accept http://, https:// and ftp:// addresses; WuInstall 3 reads the downloaded file from memory — it is never stored in the temp directory. The switches in the file replace those on the command line, so put all switches into the file (WuInstall 3 keeps a /masksensitivedata given on the command line).

Write each switch on its own line, followed by its value after a blank or =; quotes around the value are optional:

/install
/match "KB5034441|KB890830"
/smtpServer smtpTLS://mail.example.com:587
/smtpTo admin@example.com
/logfile C:\logs\$DATETIME$_WuInstall.txt

From WuInstall 3.0.1 on, the value is the rest of the line and may contain any character, and several switches may share a line (/search /download). WuInstall 2.9.x and 3.0.0 accepted only letters, digits and : - + \ / = . _ in a value (blanks only inside quotes): an email address, a regular expression with |, a criteria with ' or a path with $DATETIME$ was dropped, and the switch then took the switch on the next line as its value. From WuInstall 3.0.4 on, only one pair of quotes that encloses the whole value is removed ("C:\Program Files\Tool\pre.exe" /q stays as written), and a file saved as ANSI keeps its umlauts; WuInstall 3.0.0 to 3.0.3 read a file without a byte order mark as UTF-8 only.

⚠️ Review your options files when you move from 2.9.x to WuInstall 3: switches that 2.9.x dropped without a word now take effect — for example a /reboot between other switches on the same line, a value with @, |, ', $, & or %, or a /customActionBefore or /customActionAfter command with & or |.


/UseUpdateService MicrosoftUpdate|WindowsUpdate|WSUS|Default

Explicitly sets the update service used for searching. Overrides the system-configured default. The value is case-sensitive; an unknown value is a syntax error (exit code 7). With MicrosoftUpdate, WuInstall 2.9.x and 3 register the Microsoft Update service on the machine, and the registration stays after the run.


/tempdir "<path>"

Overrides the temp directory used by WuInstall. Defaults to %TEMP%. Do not set it to the cache directory of /install_cache or /download_cache: WuInstall 2.9.x up to 3.0.1 remove their temporary copies there, and with them the shared cache entries. From 3.0.2 on, WuInstall then skips the shared cache and downloads the updates normally.

/force

Forces update installation, bypassing checks that would otherwise skip an update.

/force_download

Forces the download, also of updates that are already installed or cannot be installed (sets the IsForced option of the Windows Update downloader).


/customActionBefore "<command>"

Executes a custom command (through cmd /c) before WuInstall runs any other operations. If the command returns an exit code other than 0, WuInstall stops and returns 1 (11 if a reboot is pending).

/customActionAfter "<command>"

Executes a custom command (through cmd /c) after the search, download and installation, before a reboot or shutdown starts. It does not run when the run failed (for example a failed search or installation). A failing command is logged and does not change the exit code.

On 64-bit Windows, WuInstall 3 runs both commands in the 64-bit cmd.exe, whichever exe name you start; from 3.0.2 on it starts cmd.exe from the Windows system folder by its full path. The 32-bit WUInstall.exe of 2.9.x ran them in the 32-bit cmd.exe, where C:\Windows\System32 and HKLM\SOFTWARE are redirected to SysWOW64 and WOW6432Node — check commands that rely on these paths.


/checkAvailableDiskSpace <drive>:<size>(KB|MB|GB)

Verifies that the specified drive has at least the required free space before proceeding. Exits with code 17 (NOT_ENOUGH_DISK_SPACE) if the check fails. WuInstall 2.9.x accepts only upper-case letters (C:500MB, not c:500mb). A drive letter that does not exist is a syntax error (exit code 7).

wuinstall /install /checkAvailableDiskSpace C:500MB


/third_party_progress <tag>

Wraps structured progress output lines with a custom tag, making it easier to parse WuInstall output from external tools or scripts. Emits tagged lines for filter results, download start/finish and install progress, plus a final return code line. Requires /show_progress for installation output. WuInstall 3 does not emit the WUAPI-Version line, the per-update current install progress lines and the finished install line per update, and its starting install line has no update ID; all other tagged lines are the same as in 2.9.x.


/retrycount <n>

Sets how many times a failed search is retried (default: 1). Useful when querying a WSUS server with a large update catalog, which can cause searches to fail due to internal WSUS limits.


/refresh_last_update_timestamps

Updates the timestamps for the last successful search, download and installation as shown in the Windows Update control panel, and restarts the Windows Update service at the end of the run.


/disable_ie_firstruncustomize

Sets the registry value DisableFirstRunCustomize to 1 in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main, which suppresses the Internet Explorer first-run setup dialog. The value is not reset after the run.

Read as Markdown

Updated