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.
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.
Command Prompt
Here’s how to install CAB files via cmd:
- Press Win + R, type
cmd
, and press CTRL + Shift + Enter. - Type the following command, replace the file path with the appropriate value, and press Enter:
DISM /Online /Add-Package /PackagePath:"C:\Filepath.cab”
- Press Y to restart if prompted to properly complete the update.
Powershell
Here’s how to install CAB files via powershell:
- Press Win + R, type powershell, and press CTRL + Shift + Enter.
- Type the following command, replace the file path with the appropriate value, and press Enter:
Add-WindowsPackage -Online -PackagePath "C:\Filepath.cab"
- 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:
- Double-click the CAB file and select all the contents inside it.
- Right-click and select the Extract option.
- Pick the destination to extract the files to and press the Extract button.
- Press Win + R, type
devmgmt.msc
, and press Enter. - Right-click the driver you’re trying to update and select Update driver.
- When prompted, select Browse my computer for drivers.
- Click on Browse, then locate and select the extracted CAB folder from Step 3.
- Press OK > Next > Close.
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:
- Press Win + R, type
cmd
, and press CTRL + Shift + Enter. - Type or copy the following command:
Dism /Image:C:\test\offline /Add-Package /PackagePath:C:\test\packages\package.cab
- 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.
- 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. - 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:
- Open an elevated command prompt window and use the following commands as appropriate.
- To list the packages in an online image:
Dism /Online /Get-Packages
- To list the packages in an offline image:
Dism /Image:C:\test\offline /Get-Packages
- 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
- 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