- Documentation
- WuInstall
Return Codes
WuInstall 3 and WuInstall 2.9.x use the following return (exit) codes. The few cases in which the two versions return different codes are listed under Differences between WuInstall 3 and 2.9.x at the end of this page; see also What's new in WuInstall 3.0.
| Code | Meaning |
|---|---|
| 0 | Successful, no reboot required |
| 1 | At least one error occurred, no reboot required |
| 2 | No more updates available |
| 3 | Updates are available, but none of them matches your filter (in combination with a filter switch such as /severity, /classification, /product, /match, /nomatch, /matchfile or /nomatchfile). If the search itself finds no updates — also with /criteria — the code is 2. |
| 4 | Invalid criteria specified (in combination with /criteria) |
| 5 | Reboot initiated successfully (in combination with /reboot or /reboot_if_needed). A successful /shutdown returns the normal result code instead. |
| 6 | Reboot/shutdown failed (in combination with /reboot, /reboot_if_needed or /shutdown) |
| 7 | Syntax error, wrong command |
| 8 | Invalid version, expiration date reached |
| 10 | Successful, reboot required |
| 11 | At least one error occurred, reboot required |
| 12 | Timeout reached (in combination with /maxruntime) |
| 15 | Reboot initiated and the next run of the reboot cycle scheduled (in combination with /rebootcycle) |
| 16 | Reboot initiated, but the next run of the reboot cycle could not be scheduled (in combination with /rebootcycle) |
| 17 | Not enough disk space (in combination with /checkAvailableDiskSpace) |
| 20 | /service was specified — an internal switch of the 2.9.x remote execution. WuInstall 3 does not support it: it logs a message and returns 20, also with /simple_error or /extended_error. WuInstall 2.9.x also selected it for the abbreviations /s and /se. |
Use /simple_error to reduce the result to 0 (success: codes 0, 2, 3, 5, 10 and 15) or 1 (all other codes); a timeout (/maxruntime) still returns 12.
Use /extended_error to get a bitmap instead — the return code is the sum of these values:
| Value | Meaning |
|---|---|
1 |
At least one error occurred |
2 |
Updates matching the filter are available |
4 |
Updates are available overall |
8 |
The /maxUpdateCount limit was reached |
16 |
Reboot required |
32 |
Timeout reached |
64 |
Invalid criteria specified |
128 |
Syntax error, wrong command |
256 |
Invalid version, expiration date reached |
512 |
Not enough free disk space |
With either switch, a command line WuInstall cannot parse (for example, an unknown switch) still returns a plain 7.
Differences between WuInstall 3 and 2.9.x
/donothing: WuInstall 3 returns the requested code (default0). WuInstall 2.9.x returned2in most cases./uninstall: if the uninstallation fails, WuInstall 3 returns1(11with a reboot pending). WuInstall 2.9.x returned0(10)./remoteis not supported in WuInstall 3. It logs a message and returns1./offlinescanwith a missing or unusable.cabfile returns1(11with a reboot pending) in WuInstall 3. WuInstall 2.9.x reported no error.- Abbreviated switch names: WuInstall 3 returns
7for the ambiguous/s,/seand/o; WuInstall 2.9.x picked/service(20) or/options. WuInstall 2.9.x returns7for/clearand/bypass; WuInstall 3 runs/clear_localcacheand/bypass_wsus. /proxy_user,/proxy_pass,/proxy_address,/proxy_auto,/noproductand/release_datereturn7in WuInstall 2.9.x and work in WuInstall 3. Their 2.9.x spellings/proxyuser,/proxypass,/proxyaddress,/proxyauto,/notproductand/releasedatework in both versions./use_mu_on_error,/use_wu_on_error: in WuInstall 3 the fallback runs and can install updates, but the code still reports the first failure (1, or11with a reboot pending), as in 2.9.x.