Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Windows»How To Install CAB File For Updates And Drivers On Windows

How To Install CAB File For Updates And Drivers On Windows

Anup ThapaBy Anup ThapaDecember 17, 2022
how to install cab file

As the name implies, a cabinet (CAB or .cab) file is like a container for storing other files (usually .inf, .dll , etc). Developers prefer this format of file packaging because of its excellent compression ratio.

On the user’s end, a CAB File is typically used to manually update a driver or install a system update when the usual methods such as Windows Update don’t work. As for how to do this, it’s very simple.

You can extract the CAB package and install it via Device Manager. Or, if you prefer the command line, you can use the DISM tool in CMD/Powershell. We’ve listed the necessary steps for all these and more in the guide below.

Table of Contents

  • How to Install CAB File Using DISM
    • Command Prompt
    • Powershell
  • How to Extract CAB Package and Install Manually
  • How to Install CAB File to an Offline Image?
  • How to Remove CAB Package from a Windows Image?

How to Install CAB File Using DISM

The DISM tool can be used to install a specified .cab or .msu package to a Windows image. You can do this via Powershell or Command Prompt as you prefer.

Note: The code listed below is for servicing online images. Attempting to add CAB packages to an offline image will return an error message along the lines of DISM does not support servicing windows with the /online option. For this purpose, check the offline section instead.

Command Prompt

Here’s how to install CAB files via cmd:

  1. Press Win + R, type cmd, and press CTRL + Shift + Enter.               
  2. Type the following command, replace the file path with the appropriate value, and press Enter:
    DISM /Online /Add-Package /PackagePath:"C:\Filepath.cab”
    add-package
  3. Press Y to restart if prompted to properly complete the update.

Powershell

Here’s how to install CAB files via powershell:

  1. Press Win + R, type powershell, and press CTRL + Shift + Enter. 
  2. Type the following command, replace the file path with the appropriate value, and press Enter:
    Add-WindowsPackage -Online -PackagePath "C:\Filepath.cab"
    powershell-add-windowspackage
  3. Restart the computer once the installation completes.

How to Extract CAB Package and Install Manually

If the command-line method doesn’t work, you can extract the CAB package’s contents and try to install the file manually. Right-click the extracted .inf file and select Install. If no such option is available, follow the steps listed below to update via Device Manager:

  1. Double-click the CAB file and select all the contents inside it.
  2. Right-click and select the Extract option.
    extract-cab-files
  3. Pick the destination to extract the files to and press the Extract button.
  4. Press Win + R, type devmgmt.msc, and press Enter.
  5. Right-click the driver you’re trying to update and select Update driver.
    update-disk-driver-device-manager
  6. When prompted, select Browse my computer for drivers.
    browse-my-computer-for-driver-software
  7. Click on Browse, then locate and select the extracted CAB folder from Step 3.
  8. Press OK > Next > Close.
Note: While updating certain driver updates, you may encounter an error message with the code 0x80070002 or similar. This is fairly common with the Realtek HD Audio Driver, for instance. Even if the error code is different, searching about it online will help you find solutions for that specific error.

How to Install CAB File to an Offline Image?

Sometimes you’ll need to install a CAB file to an offline image, and an MSU package is only supported on offline images, to begin with. For such cases, here’s how to install CAB files to an offline image:

  1. Press Win + R, type cmd, and press CTRL + Shift + Enter.
  2. Type or copy the following command:
    Dism /Image:C:\test\offline /Add-Package /PackagePath:C:\test\packages\package.cab
    add-package-dism-offline
  3. Here, replace the image path and package path with the appropriate values as indicated in the picture above, then press Enter to execute the command.
  4. If you wish to install multiple packages at once, simply add the additional packages as shown below:
    Dism /Image:C:\test\offline /Add-Package /PackagePath:C:\packages\package1.cab /PackagePath:C:\packages\package2.cab and so on.
  5. They will be installed in the order listed on the command line.

How to Remove CAB Package from a Windows Image?

You can use either the PackageName or PackagePath switches in conjunction with the Remove-Package command to remove the specified .cab package from an image. Make note that this command doesn’t work for .msu packages. With that said, here are the necessary steps:

  1. Open an elevated command prompt window and use the following commands as appropriate.
  2. To list the packages in an online image:
    Dism /Online /Get-Packages
  3. To list the packages in an offline image:
    Dism /Image:C:\test\offline /Get-Packages
    get-packages-offline
  4. To remove a CAB package using the PackageName option:
    Dism /Image:C:\test\offline /LogPath:C:\test\RemovePackage.log /Remove-Package /PackageName:Microsoft.Windows.Calc.Demo~6595b6144ccf1df~x86~en~1.0.0.0
    remove-package-package-name
  5. To remove a CAB package using the PackagePath option:
    Dism /Image:C:\test\offline /LogPath:C:\test\RemovePackage.log /Remove-Package /PackagePath:C:\packages\package1.cab /PackagePath:C:\packages\package2.cab
Note: In the commands listed above, don’t forget to replace the package name, original source, and offline image path as appropriate for the particular package you’re trying to remove.
how-to
Anup Thapa
  • LinkedIn

Anup Thapa is a tech writer at TechNewsToday. He mostly writes informative articles, tutorials, and troubleshooting guides related to Windows systems, networking, and computer hardware. Anup has been writing professionally for almost 5 years, and tinkering with PCs for much longer. His love for all things tech started when he got his first PC over 15 years ago. It was a Pentium IV system running Windows XP on a single 256 MB stick. He spent his formative years glued to this PC, troubleshooting any hardware or software problems he encountered by himself. Professionally, Anup has had brief forays into a variety of fields like coding, hardware installation, writing, etc. In doing so, he's worked with people of different backgrounds and skill levels, from average joes to industry leaders and experts. This has given him not just a versatile skillset, but also a unique perspective for writing that enables him to concisely communicate complex information and solve his reader's problems efficiently. You can contact him at anup@technewstoday.com

Related Posts

boot loop

14 Ways to Fix Windows Boot Loop

March 19, 2023
how to change windows startup sound

How to Change Windows Startup Sound

March 17, 2023
scan disk windows 10

How to Scan Disk Windows

March 16, 2023
Shared GPU Memory

What is Shared GPU Memory? How is It Different From Dedicated VRAM?

March 12, 2023
firmware vs software

Firmware Vs Software – What’s the Difference?

March 8, 2023
update sound drivers

How to Update Sound Drivers on Windows

March 7, 2023
View 3 Comments

3 Comments

  1. Bibbles on January 12, 2023 5:00 am

    thank you sir

    Reply
  2. Edward on February 2, 2023 7:09 am

    Tried to use this method to install the WebView2 fixed version cab file, but with both elevated cmd and powershell, the system could not find the file specified, when the right location was specified and it is there.

    https://developer.microsoft.com/en-us/microsoft-edge/webview2/

    On Windows 10 Ameliorated

    Thank you.

    Reply
    • Anup Thapa on February 2, 2023 10:25 am

      Hi Edward,
      I’ve seen users face that error when installing CAB files because some of the packages were corrupt. You can check the DISM and CBS logs at %windir%/logs/DISM and %windir%/logs/CBS to check this.

      Reply

Leave A Reply Cancel Reply

Latest Posts
sata ports on motherboard

All the Types of SATA Ports on Motherboard

March 21, 2023
anti-aliasing-on-or-off

What is Anti Aliasing? Should You Turn It on or off

March 21, 2023
APU vs CPU

APU Vs CPU – What’s the Difference?

March 19, 2023
You may also like
how-to-print-from-iphone

How to Print From iPhone? Step-by-Step Guide

March 22, 2023
ctrl key not working

Why is My Ctrl Key Not Working? 7 Ways to Fix It

March 21, 2023
how-to-scan-a-document-on-hp-printer

How to Scan a Document on HP Printer

March 21, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.