Versions Compared

Key

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

...

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 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:

...

With the /match option, you can get 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:

...

KB95
Office
Internet Explorer 811

If you execute

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

...

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: 

...

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 is no general rule how to automatically match the high priority categorization on the Microsoft 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, 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

...

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

...