Home > Security: Endpoint Protection, Windows Technologies > How Windows Update Stand-alone Installer (Wusa.exe) Works

How Windows Update Stand-alone Installer (Wusa.exe) Works

This article describes the Windows Update Stand-alone Installer (Wusa.exe) in Windows Vista, Windows 7, Windows Server 2008 and in Windows Server 2008 R2. The Wusa.exe file is in the %windir%\System32 folder. The Windows Update Stand-alone Installer uses the Windows Update Agent API to install update packages. Update packages have an .msu file name extension. The .msu file name extension is associated with the Windows Update Stand-alone Installer.

Back to the top

MORE INFORMATION

An .msu file contains the following contents:

  • Windows Update metadata
    This metadata describes each update package that the .msu file contains.
  • One or more .cab files
    Each .cab file represents one update.
  • An .xml file
    This .xml file describes the .msu update package. Wusa.exe uses the .xml file when you perform an unattended installation of the update by using the Package Manager tool (Pkgmgr.exe).
    For example, you download hotfix 934307. The Windows6.0-KB934307-x86.msu file is in the C:\934307 folder. You type the following command at a command prompt to expand the .msu file to a temporary folder:

    expand -f:* "C:\934307\Windows6.0-KB934307-x86.msu" %TEMP%

    Then, you type the following command at a command prompt:

    pkgmgr.exe /n:%TEMP%\Windows6.0-KB934307-x86.xml

  • A properties file
    This file contains string properties that Wusa.exe uses. For example, this file contains the name of the associated article in the Microsoft Knowledge Base.

When you use Wusa.exe to install an update package, Wusa.exe expands the contents of the .msu file to a temporary folder. Then, Wusa.exe performs the following steps:

  1. Wusa.exe uses the Windows Update metadata in the .msu file to search for applicable updates.
  2. Wusa.exe copies the contents of the applicable updates to the Windows Update sandbox. The Windows Update sandbox is a protected folder.
  3. Wusa.exe calls the appropriate function in the Windows Update Agent API according to the mode in which you start Wusa.exe.
  4. When the Windows Update wizard completes the installation, the Windows Update Agent API returns a status. Then, Wusa.exe works synchronously with Windows Update Agent API.

Note Each update in an .msu update package is installed in a separate session. Only one instance of Wusa.exe runs when you use Wusa.exe. Wusa.exe does not modify the contents of the updates in .msu files. The Windows Update infrastructure performs the required actions according to the contents of the update.
When you start Wusa.exe in interactive mode, a welcome screen displays high-level information about the update. If you continue to install the update, Wusa.exe calls the appropriate function in the Windows Update Agent API to start the Windows Update wizard. The Windows Update wizard displays the Microsoft Software License Terms that are associated with the update package. Wusa.exe calls the Windows Update Agent API to continue the installation. Then, Wusa.exe waits until the Windows Update wizard finishes the installation.
To install an .msu update package, run Wusa.exe together with the full path of the file. For example, if the Windows6.0-KB934307-x86.msu file is in the D:\934307 folder, type the following command at a command prompt to install the update package:

wusa.exe d:\934307\Windows6.0-KB934307-x86.msu

You can also double-click the .msu file to install the update package.
Note You cannot use Wusa.exe to uninstall updates in Windows Vista, Windows 7, Windows Server 2008 or in Windows Server 2008 R2. You can use Windows Defender Software Explorer to manually uninstall the updates. For more information about Software Explorer, visit the following Microsoft Web site:

http://www.microsoft.com/windows/products/winfamily/defender/softwareexplorer.mspx

You can use the following switches together with Wusa.exe:

  • /?, /h, /help
    View help.
  • /quiet
    Run Wusa.exe in quiet mode without user interaction. When the tool runs in quiet mode, it runs without user interaction. The computer restarts if it is required.
    For example, if the Windows6.0-KB934307-x86.msu file is in the D:\934307 folder, type the following command at a command prompt to install the update package without user interaction:

    wusa.exe d:\934307\Windows6.0-KB934307-x86.msu /quiet

    Note When you use this switch, the Microsoft Software License Terms do not appear.

  • /norestart
    Prevent Wusa.exe from restarting the computer. The /norestart switch is ignored if the /quiet switch is not present. If you run Wusa.exe together with these two switches, you must manually restart the operating system after the installation is complete if the installation requires that you restart the computer.
    For example, if the Windows6.0-KB934307-x86.msu file is in the D:\934307 folder, type the following command at a command prompt to install the update package:

    wusa.exe D:\934307\Windows6.0-KB934307-x86.msu /quiet /norestart

To view the Windows Update Stand-alone Installer event log, follow these steps:

  1. Click Start

    Start button

    , type event viewer in the Start Search box, and then click Event Viewer in the Programs list.

    Security shield

    If you are prompted for an administrator password or for confirmation, type the password, or click Continue.

  2. In Event Viewer, expand Windows Logs, and then click Setup.
    Setup events appear in the middle pane.
  3. In the Actions pane, click Filter Current Log.
  4. In the Event sources list, click to select the WUSA check box, and then click OK.

Back to the top

REFERENCES

For more information about the Windows Update Agent API, visit the following Microsoft Web site:

Windows Update Agent (WUA) API Reference
http://msdn2.microsoft.com/en-us/library/aa387292.aspx

Back to the top

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Back to the top



APPLIES TO
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Ultimate
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Starter
  • Windows Vista Home Basic 64-bit Edition
  • Windows Vista Home Premium 64-bit Edition
  • Windows Vista Ultimate 64-bit Edition
  • Windows Vista Enterprise 64-bit Edition
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Windows Server 2008 for Itanium-Based Systems
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Ultimate
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Standard

Reference: Description of the Windows Update Stand-alone Installer (Wusa.exe) and of.msu files in Windows Vista, Windows 7, Windows Server 2008 and in Windows Server 2008 R2

About these ads
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 212 other followers

%d bloggers like this: