Mastering WUSA: A Comprehensive Guide to Installing & Managing Windows Updates via the Command Line
The Windows Update Standalone Installer (WUSA) is a crucial command-line utility built into the Windows operating system. It empowers system administrators and power users to manually install and manage Windows update packages, offering a granular level of control beyond the standard Windows Update interface. This tool is particularly valuable for offline updates, scripted deployments, and troubleshooting update-related issues.
Understanding the Core Components: WUSA and .MSU Files
At the heart of WUSA's functionality lies the Microsoft Update Standalone Package, or .msu file. These packages are self-contained updates that include all the necessary components for a specific patch. An .msu file typically contains:
- Windows Update Metadata: Information that describes the contents of the update package.
- One or more .cab files: These are the actual update files.
- An .xml file: This file describes the .msu package and is used during unattended installations.
- A properties file: This includes text properties, such as the title of the related Knowledge Base article.
WUSA works by extracting the contents of an .msu file into a temporary folder. It then checks if the update is applicable to the system by examining the metadata. If the update is relevant, WUSA utilizes the Windows Update Agent API to carry out the installation.
Essential WUSA Command-Line Switches
The true power of WUSA is unlocked through its command-line switches, which allow for automated and customized update management. Here are the most important parameters:
| Switch | Description |
|---|---|
<path to .msu file> |
The full path to the update package you want to install. |
/quiet |
Installs the update in silent mode with no user interaction. The system will restart automatically if required. |
/norestart |
Prevents the system from automatically restarting after the update is installed. This switch is only effective when used with /quiet. |
/warnrestart |
When used with /quiet, this switch will prompt the user before a restart is initiated. |
/forcerestart |
Combined with /quiet, this forces applications to close and the system to restart after installation. |
/uninstall |
Removes a previously installed update. |
/kb:<KB number> |
Used with the /uninstall switch to specify the Knowledge Base number of the update to be removed. |
/extract |
Extracts the contents of the .msu package to a specified folder without installing the update. |
/log:<filename> |
Specifies a log file for the update actions, which can be helpful for troubleshooting. |
Practical Applications of WUSA
Installing Windows Updates
To install an update, you simply need to specify the path to the .msu file. For a hands-off, automated installation, you can use the /quiet and /norestart switches. This is ideal for scripting the deployment of updates across multiple machines.
Example of a silent installation without an automatic restart: