Other Options
/autoaccepteula
Automatically accepts all EULAs required by updates before installation, enabling fully unattended operation. 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 /criteria "IsInstalled=1" /logfile "C:\logs\WuInstall.txt"
2022/08/24-08:10:37 Searching for updates ... Criteria: IsInstalled=1
2022/08/24-08:10:40 Result Code: Succeeded
2022/08/24-08:10:40 50 Updates found in total, filtering ...
Filename variables — supported by /logfile, /logfile_append, and /xmlout:
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 |
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.
/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!
⚠️ Use with caution when combined with/use_wsusor/bypass_wsus, as these options modify registry state that may not be restored if WuInstall is forcefully terminated.
/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 | Codes 1, 4, 6, 11, 12 |
/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 |
/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 /uninstall.
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 all console output. Log file output is unaffected.
/donothing [retcode]
Takes no action and returns the specified exit code (default: 0). Useful for testing script logic.
/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$).
/query_history
Appends the full update installation history to the XML output. Requires /xmlout. May produce very large output on Windows 7 and older systems.
/info
Prints XML system information to the console. Can be used standalone without a core switch.
/includeRecommendedUpdates
Includes optional and recommended updates in the search results.
/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.
/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.
/UseUpdateService MicrosoftUpdate|WindowsUpdate|WSUS|Default
Explicitly sets the update service used for searching. Overrides the system-configured default.
/tempdir "<path>"
Overrides the temp directory used by WuInstall. Defaults to %TEMP%.
/force
Forces update installation, bypassing checks that would otherwise skip an update.
/customActionBefore "<command>"
Executes a custom command before WuInstall runs any other operations.
/customActionAfter "<command>"
Executes a custom command after WuInstall completes all other operations.
/checkAvailableDiskSpace <drive>:<size>
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 /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 start/finish per update, plus a final return code line. Requires /show_progress for installation output.
/retrycount <n>
Sets the number of search retry attempts on failure. 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_timestamp
Updates the timestamps for the last successful search and install as shown in the Windows Update control panel.
/disable_ie_firstruncustomize
Suppresses the Internet Explorer first-run setup dialog during update installation.