In latest operating systems such as Windows 7, Windows 8, Windows Server 2012 you can find tool called WUSA.WUSA.EXE is a command line tool which helps to run ‘windows update standaloneinstaller’.The windows update stand-alone installer uses application programming interface of windows update agent to install update packages which have an .msu file name extension.
wusa /extract: [/log:] wusa [/quiet] [/norestart | /warnrestart: | /promptrestart | /forcerestart] [/log:] wusa / uninstall < | /kb:> [/quiet] [/norestart | /warnrestart: | /promptrestart | /forcerestart ] [/log:]
Commands and operations:
- update – full path of the MSU file.
- /quiet – It indicates quiet mode,no user interaction.Reboot as needed.
- /uninstall – installer will uninstall the package.
- /kb – When compined with /uninstall,installer will uninstall the package associated with the KB number.
- /extract – Installer will extract the package contents to the destination folder.
- /norestart – When compined with /quiet,installer will NOT initiate reboot.
- /warnrestart – When combined with /quiet,installer will warn the user before initiating reboot.
- /promptrestart – When compined with /quiet,installer will prompt before initiating reboot.
- /forcerestart – When compined with /quiet,installer will forcefully close applications and initiate reboot.
- /log – This command initiate installer to enable logging.
This is very helpful tool and for example you can use it in batch script to uninstall specific KB or patch if you will. I have found very useful this tool when I am need to uninstall IE Cumulative Security Updates as they cause sometimes compatibility issues on some systems.
Here is simple batch file to uninstall KB2744842 – IE cumulative security update
@echo off wusa /uninstall /kb:2744842 /quiet /forcestart END
So this will uninstall the KB from teh systema nd force the system reboot once the uninstall is completed. As well you can use this tool to install .msu package on your systems
@echo off START /WAIT WUSA Windows6.0-KB928439-x86.msu /QUIET /NORESTART
I believe this command tool can be very useful in some situations for sys admin.
Some reference links: