CAB or Cabinet files are compressed files that store data related to various system-based installations on a Windows PC. These can also be related to the updates to the OS as well as a driver update. The compression here is based on lossless compression. These .CAB files are also referred to as Diamond Files. They behave in a similar way to .ZIP files. The reason behind this is that they both use Quantum, LZX or DEFLATE compression algorithms to compress the contents inside them. It can hold up to 65,535 CAB folders. It is usually executed by an installer built into Windows 11/10. This installer extracts the files stored in the Cabinet Archive and executes them one by one. The main recognition of these authentic Cabinet files lies in the first 4 bytes. If you open any authentic CAB file as a text file with your text editors like Notepad or Visual Studio Code, you will see MSCF being the first four letters.
We have earlier seen how to extract CAB Files using command line tools, now let us see how to how to create or install Cabinet files on Windows 11/10.
How to create a CAB File in Windows 11/10
Creating a CAB file in Windows 11/10 is not much of a task. There is a program that comes with Windows called as makecab.exe. Now, when you enter commands like,
makecab.exe C:\files\program.jpg C:\files\program.cab
in the Windows Command Prompt, you can take advantage of the makecab.exe.
With the command given above, the JPG Image stored inside C:\files\ is moved inside of a file called program.cab inside the same path.
How to install a CAB file on Windows 11/10
There are two methods by which one can install CAB files on Windows 11/10. The first one uses using the context menus, and the second one involves the usage of the Command Prompt.
1] Using the Context Menus
This method is fairly simple.
All you need to do is Select the Cabinet File and then Right click on it.
When you see the context menu popping out, just click on Install which is the second option from the top.
Follow the prompts on the screen and you are done.
2] Using the Command Prompt
Start by opening the Command Prompt with Administrator level rights.
Now, type in the following command,
DISM /Online /Add-Package /PackagePath:"<PATH>"
Here, replace <PATH> with the original path of the file.
For example, C:\Users\Ayush\Downloads\CAB\new.cab
Now, hit Enter.
If prompted, Reboot your computer by entering Y and then hitting Enter again.
Now, your Cabinet File is executed.
If curious, you can learn more about the Microsoft Cabinet Format at the Microsoft Cabinet Format documentation on MSDN.
TIP: Learn how to add Install CAB item to the Context Menu.