Knowledge base article describing how to extract .msu files and automate installing them

The .NET Framework 3.5 installs service packs for the .NET Framework 2.0 and 3.0 behind the scenes as prerequisites.  On Windows Vista and Windows Server 2008, the .NET Framework 2.0 and 3.0 are installed as OS components, which means that the 2.0 and 3.0 service packs are delivered as .msu files that contain OS update metadata files and payload.

I was asked by a colleague today about how to view and extract the contents of the .NET Framework 2.0 SP1 and 3.0 SP1 .msu files and then automate the installation if needed.  An .msu file is essentially a .zip file, so in the past I have used standard .zip viewing tools (such as WinZip) to view the contents.

Fortunately, my colleague found a useful knowledge base article describing how to automate this type of scenario and I wanted to post a link to it here to hopefully make it easier to find.  You can check out the article at this location:

To summarize the information in that article, you can use the following syntax to extract the contents of an .msu file.  I am using the .NET Framework 2.0 SP1 .msu file that is included as a prerequisite for the .NET Framework 3.5 in the below examples:

expand -f:* "NetFX2.0-KB110806-v6000-x86.msu" %temp%\netfx20sp1

After extracting the contents of the .msu file, you can install it by using Package Manager (pkgmgr.exe) with a command line like the following:

pkgmgr.exe /n:%temp%\netfx20sp1\Windows6.0-KB110806-v6000-x86.xml

Alternatively, you can use Windows Update Standalone Installer (wusa.exe) to directly install a .msu file without extracting it by using a command line like the following:

wusa.exe "NetFX2.0-KB110806-v6000-x86.msu" /quiet /norestart

Comments (5)

  1. says:

    Hey, you can use this method if you have multiple .msu and want to automate them

    Copy below line and save as update.bat in a folder where you have downloaded .msu and run the update.bat file.

    for %%i in (*.msu) do start /w wusa.exe %%i /norestart /quiet

    If you have few .msu in sub dir then use this

    for %%i in (dir /b *.msu) do start /w wusa.exe %%i /norestart /quiet

  2. VK says:

    We have approx 150 servers and patching was absolute manual process. Yes, this realy helped to automate patching process. We gained lot of time. Thanks a lot !!

  3. Is it possible to do this from WIX bootstrapper exe?

    1. Hi Vaibhav Gawali – Yes, it is possible to run wusa.exe command lines from a WiX bootstrapper.

Skip to main content