How to Install Windows Updates from MSU and CAB files

You might be familiar with the process of updating your Windows operating system through Windows Update. It is simple and all you need to do is check for updates and then reboot your computer if required. But what if the process gets stuck and there is nothing you can do?

Well, you can manually install the updates using the MSU or CAB standalone files available to download from Microsoft’s website . This will update your OS and save you the hassle of unnecessarily rebooting your computer and troubleshooting the Windows Update process.

This article discusses how you can manually install Windows updates by downloading standalone MSU or CAB files.

What is MSU/CAB file

An MSU file is a package that contains all the information and data needed to successfully execute the update package within itself. The MSU file contains the following:

  • Windows Update metadata – It describes the individual update file within the package.
  • .cab files – Each cab file contains one update.
  • .xml file – This file describes the .msu package.
  • Properties file – This file contains information like KB (update) ID, Package type, the title of the associated article in Microsoft Knowledge Base, etc. These properties will be used by the Windows Update Standalone Installer (WUSA) when the installation begins.

In other words, an MSU file has all the data to check whether the update applies to your PC by checking its metadata. If it does, extract the contents of the .cab files and install them on your PC.

If the update does not apply to your computer, you may see a prompt stating “The update is not applicable to your computer.”

not applicable

A .cab file, also known as a cabinet file, are compressed files containing system drivers or files. As from what we have discussed above, these are already included in a .msu file. This contains the updates that are applicable to your OS. This file type supports lossless data compressions, hence deemed best to deliver standalone software updates.

CAB files are mostly used when installing updates through WSUS, as the files only have the updated content. However, MSU files have made the installation of Windows updates much convenient for individual users.

Microsoft uses both of these formats depending upon the type of release. For example, Microsoft recently released the update KB4601319 in a .cab file. However, the update before that, KB4598291, was released in a .msu file. Hence, Microsoft releases dynamic cumulative updates as CAB files and cumulative updates as MSU files.

IT won’t matter which updates you are installing, as the end result is the same, but the processes to install are different, as you will discover in the article.

How to install Windows updates from MSU files

AN MSU file contains all the metadata required to automatically detect and install the correct update on your PC. Nonetheless, there are still several different ways to install an update using a .msu file.

Install Windows updates from MSU files regularly

If you want to perform a basic installation using an MSU file, all you need to do is execute the file. Double-click the .msu file and they will do the rest for you. If the update is applied to your version of Windows, it will install it automatically.

You may be prompted with a confirmation box. If so, click Yes to install the update.

Install Windows updates from MSU files using Command Prompt

Another way to install Windows updates from an MSU file is through the Command Prompt. It is especially helpful if you want to quietly install it, meaning you do not want any confirmation while doing so. Follow the simple steps below to do so:

  1. First, download the MSU file from Microsoft Update Catalog and place it at any location on your PC.
  2. Now launch Command Prompt with administrative privileges.
  3. Use the following command to execute the MSU package that you have already downloaded:
    wusa.exe <em>Path</em>\<em>UpdateKBName</em>.msu /quiet /norestart
    Replace Path with the complete path for the file location and UpdateKBName with the full name of the MSU file, as in the example below:
    msu wusa

Your installation will now begin without you even noticing, and the computer will not restart unless you manually do it.

Install Standalone Windows Update from .MSU File using PowerShell

You can also install Windows Updates from an MSU file using Windows PowerShell. This method is especially useful for those willing to install bulk Windows updates without losing any additional time than necessary.

First, place the MSU file(s) in a single folder, where the folder’s name must not have any spaces. We will call this folder “UpdatePath,” as we will use it as a variable in the script given below.

You will then need to Run “PowerShell ISE” with administrative rights. To do so, search for it in the Start Menu, and then click Run as Administrator under it.

Run pwsh ISE admin
Run pwsh ISE admin

Here, paste the following PowerShell script and then edit it to your scenario. Read the explanation of the script below to understand how it works.

$UpdatePath = "C:\Updates"
$Updates = Get-ChildItem -Path $UpdatePath -Recurse | Where-Object {$_.Name -like "*msu*"}
ForEach ($update in $Updates) {
    $UpdateFilePath = $update.FullName
    Start-Process -wait wusa -ArgumentList "/update $UpdateFilePath","/quiet","/norestart"
}
script running
script running

At the top, a variable named “UpdatePath” has been declared which will define the path of the folder where the MSU file(s) are stored. This is the only definition you need to change according to your environment.

Then, in the second line, we are fetching the names of the files with a .MSU extension in the UpdatePath folder, and saving that information to the Updates variable.

In the third line, we are initiating a ForEach loop, which will iterate the items in the Updates variable one after the other. This will make sure that all .MSU files stored in that variable are fetched one after the other.

Next, we are storing the complete path of the .MSU file in the UpdateFilePath variable.

Now we are going to begin the process of Windows Update installation. The “wait” argument will ensure that the next iteration, meaning the next .MSU file is not loaded unless the current one is finished installing. The “quiet” argument will run the installation in the background, and “norestart” will not prompt you to reboot your computer once the installation is completed.

The script will then run until all of the .MSU files have been installed on your computer, which can take a while.

Moreover, you can add as many .MSU Windows Update files in the UpdatePath folder as you want, and this script will install them all (if applicable to the current OS). This will save you time in case of bulk Windows Update installation.

Extract .cab files from .msu files

This section illustrates how you can extract the .cab files from MSU files which you can install using the technique given further in the article where we discuss the installation method for CAB files.

This is especially useful if you are unable to install an MSU update, then you can extract the .cab files and still install the update. Follow the steps below to do so:

  1. Initially, create an empty folder at any location of your choosing to which we will later extract the MSU file.
  2. Launch Command Prompt with administrative privileges.
  3. Now use the command below to extract the .msu file which will give you the .cab file separately.
    expand _f:* “PathToMSU\UpdateKBName.msu” PathToEmptyFolder\EmptyFolderName
    In the command above, replace PathToMSU with the complete path to the MSU file you want to extract, UpdateKBName with the name of the MSU update, PathToEmptyFolder with the complete path to where you have created an empty folder in step 1, and finally, EmptyFolderName with the name of that folder. Here is an example:
    msu extracted

As you can see in the image above, 4 files have been extracted which are the same ones as we have discussed earlier in the article. You can now find the extracted files within the folder that you have created.

extracted stuff

How to install Windows updates from CAB files

CAB files might be somewhat complicated for some to install, as they cannot be installed simply by executing the package.

You can use Command Prompt to install a .cab file containing a Windows update, even the one you may have extracted from a .msu file. Follow the steps below to do so:

  1. Launch the Command Prompt with administrative privileges.
  2. Use the following DISM command to install an update from a CAB file:
    dism /online /add-package /packagepath:"<em>PathToCABFile.</em>cab"
    Replace PathToCabFile with the complete path and name of the CAB file as in the example below:
    cmd

Your installation should now begin directly from a .cab file. If there are multiple CAB files, then you will need to execute them individually with the above command.

Closing words

As we mentioned earlier, there isn’t any difference in the Windows update regardless of the file type. However, the methods to install the MSU and CAB files are very distinct, as you may have learned in the article above.

Let us know which method you prefer to install your Windows updates with in the comments section below.

If you liked this post, Share it on:
Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

Leave the first comment

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information