WuInstall Version 1.2. PRO

(c) 2009 by hs2n Information Technology

WuInstall is a command line tool for windows, which enables you to install windows-updates for a certain workstation in a controlled way by using a command line script instead of the standard window update functionality.

It can be used by administrators for updates on many workstations using scripts or for users who do not want to us the automatic windows upates. 

WuInstall uses the windows update API and is written in C++. It searches either on the Microsoft - Update - Server or at the internal WSUS-Sever (depending on system configuration) for currently available updates for the current workstation and can also download and/or installs these updates. It is roughly comparable with a simplified apt-get command like in linux.



Remark for using proxies:

- When using a proxy which needs authentifcation, the user who executes wuinstall has to have the right to access the internet via the proxy
- When using a WSUS via prox, the wsus should be in the proxy exception list



Usage: 	Usage: WuInstall.exe [/search | /download | /install | /help ] [/reboot [nseconds]] [/match "regex"] [/nomatch "regex"] [/criteria "criteria"] [/severity severity_level]  [/classification update_classification] [/product "product_name"] /bypass_wsus


Features:

	/search -> Searches only for available updates

	/download -> Searches and downloads updates

	/install -> Searches and downloads and installs update

	/reboot [nseconds] -> Forces a reboot with a delay of nseconds after executing WuInstall. If nothing is specified, the delay is 10 seconds by default

	/criteria "query string" -> searches for updates, which match the query string. For query strings see http://msdn.microsoft.com/en-us/library/aa386526(VS.85).aspx. The default criteria is "IsInstalled=0 and Type='Software'"

	/match "regexp" -> searches for updates which match the search string (no regular expressions posible so far!)
	
	/nomatch "regex" -> searches updates that DONT match regex (regular expressions supported!)
	
	/matchfile file -> searches updates that match one of the match expressions in file (regex supported!)

	/nomatchfile file -> searches updates that DONT match any of the match expressions in file (reges supported!)

	
	/severity  severity_level -> updates that match severity level(s)
	severity_level: C=Critical I=Important M=Moderate L=Low U=Unknown

	/classification update_classification -> updates matching certain classification(s)
	update_classification: C - Critical Updates, U - Updates, R - Update Rollups, S - Security Updates, E - Service Packs, F - Feature Packs
	
	/product "product_name" -> search updates for a certain product (Windows XP, Office 2007, SQL Server 2005, ...)
	
	/bypass_wsus -> if a WSUS is used, switches off the WSUS server before executing WuInstall commands, and then switches WSUS on again afterwards

	/autoaccepteula -> automatically accepts eula on every update

/reboot, /criteria, /match, /severity, /classification and /product are applicable with search, install or update. They can also be used in combination.

Examples:

- List all Software updates which are already installed and match the expresion "KB934"
	wuInstall /search /criteria "IsInstalled=1 and Type='Software'" /match "KB934"

- Install all Critical and Imporant Software updates
	wuInstall /install /severity CI

- Install all Critical, Imporant and Medium Severity Software updates which match the term "Office" or ".NET" and reboot afterwards
	wuInstall /install /severity CIM /match "(Office)|(NET)" /reboot




Return codes:
	0  -> successful, no reboot required
	1  -> at least one error occured, no reboot required
	2  -> no more updates availabe
	3  -> no updates available that match specified match expression / severity
	4  -> invalid criteria specified
	5  -> reboot initialized successfull
	6  -> reboot failed
	10 -> successful, reboot required
	11 -> at least one error occured, reboot required


see also http://www.xeox.com for details and new versions


contact wuinstall@hs2n.at for questions and requests