This option displays the usage.
Searches for available updates using the windows update API. If no creterion (see ) is specified, it searches for not already installed updates (IsInstalled=0 and Type='Software'). Drivers are not included in the default /search option!
If the use of a WSUS is configured (this is the case when HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\UseWUServer is set to 1), it uses the configured WSUS Server (which is set with HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUServer\) to get the list of updates matching the criteria. Otherwise (when UseWUServer is set to 0), it goes directly to the Microsoft Update Site.
If there is a WSUS Server configured, WuInstall will report for example:
Otherwise, if going to the Microsoft Update Site, it will report:
The search for updates will start with the message
and will ask either the WSUS or the Microsoft Update Site for a list of available updates matching the criteria. If the criteria is invalid, WuInstall will print "Invalid criteria" and exits here, returning code 4.
Sometimes, the search might fail for some reason. In case of an error WuInstall tries the search automatically a second time. If the search fails once more, WuInstall exits with return code 1 and also displays the error code for the reason why the search failed:
If the search was successful, WuInstall types:
If no updates were found, it will report:
and exit with return code 2.
If updates were found, it will display the total number of updates found:
If no update matches the filters, WuInstall will report:
and exit with return code 3.
If there are updates, which match the filters, then they are displayed in a result list like this:
The first line contains the position and the complete name of the update. The severity, classification and product are displayed in the following lines.
When using the /search option, after listing the updates, WuInstall exits with code 0, without any further action.
only /search was specified, stopping here!
So this option is useful for just checking which updates are available (and, for example, with the criteria "IsInstalled=1" also for checking which updates are already installed), or for testing search criteria and filter options before downloading and installing.
The /download option first of all executes a search (exactly the same one the /search option does, considering all parameters for criteria and filters).
If there are entries in the result list (updates, matching the criteria and filters, were found), it immediately starts downloading them (either from WSUS or the Microsoft Update Site), displaying:
The updates are downloaded in exactly the same order in which they are displayed after the search.
When starting the download, WuInstall displays:
It is possible to track the download progress (see the /show_progress option).
Updates, which have already been downloaded (they can be excluded in the result list of the search with the /isdownloaded option), are usually not downloaded again, so the download is "finished" immediately.
WuInstall usually (depending on OS version and system configuration) caches the downloads in the directory Windows\SoftwareDistribution\Download. Using the /download_to option instead of /download, it is also possible to put exe / msi of the downloaded updates to a certain directory for manual installation.
When the download of an update fails for some reason, WuInstall displays
and the error code and reason why the download failed. WuInstall then immediately exits with return code 1 without downloading the pending downloads in the result list.
When all updates in the result list have been successfully downloaded, WuInstall displays
and exits with return code 1.
This option does almost exactly the same as /download, but furthermore it copies the updates to the specified directory, usually in msi or exe format.
These updates can be installed manually afterwards.
After downloading an update to the update cache (usually Windows\SoftwareDistribution\Download), WuInstall displays for example
and displays an "OK" if successful, otherwise an error code.
Most updates are update bundles, which means that there are multiple sub-updates. Each will create a separate installation file in the directory.
WuInstall will display for each bundle:
With update bundles it is quite likely to have more installation exe / msi files than updates.
If copying an update file to a directory fails, WuInstall just displays the error code like this:
but it does not force WuInstall to abort the entire process. It continues with the next update in the result list (or the next sub-update in the bundle) in any case.
The option /download_to can also be used to copy updates, which are already in the download cache to a directory (with /isdownloaded 1).
This option first executes exactly the same as /download (=searching and downloading updates) and then starts installing the downloaded updates.
Before installation, the downloaded updates are listed and checked, if they have been downloaded properly and, if they are ready to be installed. Furthermore, it is listed, if the Eula is known ("Eula Accepted: true") - otherwise, see /autoaccepteula option.
This looks for example like this:
Now, the installation starts, all updates are installed in one single step. It is possible to track the installation progress (see the /show_progress option).
If the installation fails for some reason, WuInstall prompts
and immediately exits with code 1 and shows the error code.
In case the installation ran through, WuInstall enumerates the result for every single update and finally the overall result code:
Afterwards, WuInstall checks, if one or more updates need a reboot.
If yes, WuInstall exits with code 10, otherwise with code 0.
This option uninstalls updates from a machine.
The /uninstall option automatically searches for already installed updates offline (see /offline option) with the criteria "IsInstalled=1" and uninstalls them. All filter options (e.g. /match, /product, /severity, ...) are available to specifically select updates to be uninstalled.
Typing just WuInstall /uninstall without any filter options is not advised!
For example, to uninstall KB2251419 use:
WUInstall.exe /uninstall /match KB2251419
The /uninstall option only works with updates which have been installed using a WSUS.
Otherwise it usually gives the error code 0x80240028 - WU_E_UNINSTALL_NOT_ALLOWED (The update could not be uninstalled because the request did not originate from a WSUS Server).
There are also some updates which fail to be uninstalled with WuInstall because of internal dependencies.