|
|
Basic Options | |
---|---|
/helpThis option displays the usage. /searchSearches for available updates using the windows update API. If no creterion (see /criteria ) 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: You are using WSUS Server http://wsus.mycompany.local:8530 Otherwise, if going to the Microsoft Update Site, it will report: You have no WSUS Server configured It is possible to temporarily set, reset or change the use of a WSUS for the execution time of WuInstall, see /bypass_wsus and /use_wsus. The search for updates will start with the message Searching for updates ... Criteria: IsInstalled=0 and Type='Software' 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: Search failed ... retrying ...Search failed 2 times. Result CODE: 0x0 0x8024402C - The proxy server or target server name cannot be resolved. If the search was successful, WuInstall types: Result Code: Succeeded If no updates were found, it will report: No Updates are available, nothing to do! and exit with return code 2. If updates were found, it will display the total number of updates found: 10 Updates found in total, filtering ... Now, the updates are filtered, if there are filters specified. For details on filtering see the following options: /severity, /classification, /product, /match, /nomatch, /matchfile, /nomatchfile, /isdownloaded If no update matches the filters, WuInstall will report: No Updates available for specified match string / severity / product! and exit with return code 3. If there are updates, which match the filters, then they are displayed in a result list like this: 1. Definition Update for Microsoft Forefront Client Security - KB977939 (Definition 1.87.1797.0) Severity: Unknown UpdateClassification - Definition Updates Product - Forefront Client Security 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. /downloadThe /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: Downloading updates ... The updates are downloaded in exactly the same order in which they are displayed after the search. When starting the download, WuInstall displays: Downloading Definition Update for Microsoft Forefront Client Security - KB977939 (Definition 1.87.608.0): 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 Download failed! 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 Downloading finished, listing downloaded updates and counting... Result Code: Succeeded only /download was specified, stopping here and exits with return code 1. /download_to_directoryThis 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 Copying download to c:\my_updates... 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: Copying bundle .NET 4 Client x86 (Win7) .... OK 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: Copying bundle Microsoft .NET Framework 4 Client Profile Language Packs x86 .... Error: 0x80246007 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). /installThis 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: Install was specified. Beginning Install Portuguese (Brazil) Language Pack - Windows 7 (KB972813), Eula Accepted: true Danish Language Pack - Windows 7 (KB972813), Eula Accepted: true 1 Updates are ready to be installed! Beginning install ... 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 Install failed! 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: Enumerating result for every single update 1. Portuguese (Brazil) Language Pack - Windows 7 (KB972813): Result Code: Succeeded 2. Danish Language Pack - Windows 7 (KB972813): Result Code: Succeeded Overall Result Code: Succeeded Afterwards, WuInstall checks, if one or more updates need a reboot. Install or Download finished, reboot required: NO If yes, WuInstall exits with code 10, otherwise with code 0. /uninstallThis 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 You are using WSUS Server http://mywsus.local:8530 Searching offline for already installed updates... Searching for updates ... Criteria: (IsInstalled=1) Result Code: Succeeded 96 Updates found in total, filtering ... Listing those matching search expression: 'KB2251419' 1. Security Update for Microsoft Office Word 2007 (KB2251419) Severity: Critical Product - Office 2007 UpdateClassification - Security Updates Uninstalling Updates ... Successful Enumerating result for every single update 1. Security Update for Microsoft Office Word 2007 (KB2251419): Result Code: Succeeded Overall Result Code: Succeeded 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. |