Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are three basic switches. Exactly one of them must be specified in order for wuInstall WuInstall to do something. It makes no sense to specify more than one of those switches (e.g. wuInstall /search /install), because download automatically includes a search and install automatically includes search and download.

...

WuInstall /search

It lists all update, which are available updates. It either searches on the Windows Update Server in the internet, or, if configured, on your WSUS. It has no impact on your system at all. In that this case it just performs a search and lists what was found.

...

Does exactly the same as WuInstall /download, but afterwards it copies the contents of the downloaded updates (usually .exe or .msi-files) for example to c:\updates_download, from where they can be installed manually or copied and used for patching other machines.

1.4. Installing updates

To install the updates, you use:

wuInstall /install

It again searches the updates, downloads them (if they have not already been downloaded by a previous WuInstall /download command already) and then installs them.

...

With various switches, you can narrow the results of the search for updates and therefore also the updates, which are downloaded and installed. You can use criteria queries, search updates, which match certain names, severities, products or classifications.

...


Tip: In subsequent examples, we only use the /search option to illustrate how to select updates. This option is ideal to test certain switches, because it just lists the updates and has no further impact on the system. Of course, also the /download or /install switch can be used with all following the examples.

 


2.1. Specifying criteria

With /criteria you can specify a query string, in order to change the search. The default criteria (when no /criteria is specified) is "IsInstalled=0 and Type='Software'".

...


Tip: For how the query string can be built see MSDN

 


You can, for example search for updates, which are already installed:

...

Furthermore you can also just select Driversdrivers:

wuInstall /search /criteria "IsInstalled=0 and Type='Driver'"

or Drivers drivers and Softwaresoftware:

wuInstall /search /alltypes

...

With the /match option, you can get updates of which the title matches all updates with titles matching a specific search string.

...


Tip: You can test the /match option for example with /criteria "IsInstalled=1", because then you (usually) have a very long list of updates in your search.

 


For example, you can search for a specific update:

...

In the WuInstall Pro Version, there is, corresponding to the /match-switch also a /nomatch-switch For example, search all Updates updates which do NOT match "SQL" OR "Windows" OR "KB"

...

/match and /nomatch can, of course, also be used in combination, for example search all Updates updates which match "SQL" OR "Office" but do not Match "KB" or "Microsoft"

...

KB95
Office
Internet Explorer 811

If you execute

wuInstall /search /matchfile c:\Data\match.txt

...

There is also a /nomatchfile switch, which does the opposite, which excludes updates matching one of the search terms in the file.

...

  •  Critical (C): A security issue whose exploitation could allow the propagation of an Internet worm without user action. 
  •  Important (I): A security issue whose exploitation could result in compromise of the confidentiality, integrity, or availability of users' data, or of the integrity or availability of processing resources. 
  •  Moderate (M): Exploitation is mitigated to a significant degree by factors such as default configuration, auditing, or difficulty of exploitation. 
  •  Low (L): A security issue whose exploitation is extremely difficult, or whose impact is minimal. 
  •  Unknown (U): No information about the severity is available.

In The letter the in brackets is the code for the /severity - option. Just put the letters together to select multiple severities.

...

WuInstall /search /severity CI


 

Tip: The severity is only filled for security updates, so it is not really suitable for finding high priority updates, as security updates usually ARE high priority updates. Classification is better for that purpose.

 


2.6. Classification

Each update belongs to one of those classifications: 

...

Just put the letters in the bracket together to select multiple severities. For example, select all security updates, critical updates and Updatesupdates:

WuInstall /search /classification SCU

...


Tip: High priority updates can best be found with the classification CRS (Critical, Security and Update Rollups), however sometimes also U (Updates) can be high priority. Generally speaking, selecting which updates are high priority and which are not, is up to the administrator, there . There is no general rule how to automatically match the high priority categorization on the Microsoft update Update website.

2.7. Product

Each update belongs to a Microsoft product, for example Office 20032019, Windows XP11, Visual Studio 20082019, Silverlight, ...

The /product switch enables to search by one product.

For example, find all Updates for Visual Studio 2008 2019:

...


Tip: The product name has to match exactly. Therefore just specifying "Visual Studio" here would produce no results.

WuInstall /search /product "Visual Studio 20082019"
 


Tip: All update selection options (/match /nomatch /matchfile /nomatchfile /severity /classification /product) can be used in combination with each other!

3. Additional options

...

WuInstall /install /reboot

...


Tip: The /reboot option reboots the system after executing WuInstall unconditionally after the specified number of seconds. The result of WuInstall has no influence whether if there is a reboot or not.

3.2. Rebootcycle

With this option complete cumulative updating of windows systems becomes possible. That means installing updates, rebooting and installing further updates will be automated. After performing an update and rebooting afterwards, WuInstall starts again before the Windows Logon and executes the same command again, which that was done before the reboot. The /rebootcycle option uses the Windows Task Scheduler to restart WuInstall.

...


Tip: You can limit this reboot cycle option to a maximum number of reboots to prevent of getting stuck in an endless loop. Default is 3.

The /rebootcycle option works together with /reboot or /reboot_if_needed.

...

After execution of WuInstall, WSUS is re-activated for your system. This option automatically executes the Sc stop wuauserv and Sc start wuauserv commands in order for the bypass to take effect.

...


Tip: If WuInstall fails for some reason or is aborted before it finishes, the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU, Value UseWuServer is still set to 0. You have to set it to 1 manually, in order to tell your system to use WSUS again.

 


3.5. Selecting another WSUS

Quite the opposite of the bypass_wsus option is the /use_wsus option. If you want to choose another WSUS, or if you have no WSUS configured at the machine and want to get updates from a certain WSUS, the use_wsus option can force WuInstall to use a certain WSUS

...

use_wsus specified, reactivating  WUServer http://wsus1,  WUStatusServer http://wsus1 ... successful!

...


Tip: If WuInstall fails for some reason, or is aborted before it finishes, the registry keys HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\UseWuServer, HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUServer, HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUStatusServer

have to be reset manually to the initial state.

3.6. Accepting EULAs

Some updates require the user to accept an EULA in order to install. To automate this, the /autoaccepteula option automatically accepts all EULAs for updates which require this, without any user interaction or interruption.

...