Cabinet (file format)
Cabinet (CAB) file format
A CAB file is a Microsoft archive format with the .cab extension. It uses lossless compression and can include digital signatures to help verify integrity.
Structure and limits:
- A CAB file can have up to 65,535 folders, each containing up to 65,535 files. This allows a maximum of about 4.29 billion files.
- Each folder is stored as a single compressed block, which can make compression more efficient than compressing files individually.
- Empty folders cannot be stored in a CAB archive.
Paths and compression:
- The format does not specify how file paths should be stored; software decides how to handle paths.
- Various compression algorithms may be used within CAB files.
- CABs can reserve space for signatures or other data inside the archive.
How to work with CAB files:
- Creating: Windows provides the makecab command-line tool.
- Extracting: You can extract CAB files with File Explorer, Setup API, or command-line tools like expand, extract, or extrac32. Other programs that can handle CABs include WinZip, WinRAR, and 7-Zip.
- On Linux, cabextract can extract CABs, and gcab can both extract and create them.
Common uses:
- Many Windows installation technologies use CAB files, including Windows Installer (.msi may contain CABs), Windows Setup, Setup API, Device Installer, Theme Pack, and AdvPack (used by Internet Explorer for ActiveX components).
- Self-extracting installers like IExpress often use CABs.
Embedded and related notes:
- Some installers embed CAB files inside other formats (e.g., MSI/MSU packages).
- Windows keeps Component-Based Servicing (CBS) logs in C:\Windows\Logs\CBS, and temporary files in C:\Windows\Temp; a compression bug can cause runaway log growth.
- On Linux, firmware updates from hardware vendors may be distributed as CAB archives (used by fwupd).
- The .cab extension is also used by other installer formats (e.g., InstallShield), which may not be compatible with standard CAB tools. Some Windows CE software uses slightly different CAB details (ISC).
This page was last edited on 2 February 2026, at 11:54 (CET).