The short answer
- CAB is Microsoft's compressed archive format that stores multiple files with compression across file boundaries; a split archive may require additional CAB volumes for complete extraction.
- On Windows, open Command Prompt and list entries with `expand -d "archive.cab"`. Create a destination folder, then extract all entries with `expand "archive.cab" -f:* "C:\CAB-out"`. Use `-f:filename` to select a file. On a Mac or phone, use an archive app whose documentation explicitly lists CAB support, or extract the files on Windows and transfer them. Keep the other volumes available when working with a split archive.
- Treat an unfamiliar CAB cautiously and keep Windows and the viewer updated. Microsoft's MS10-019 addressed CVE-2010-0487, where opening a specially crafted signed CAB could execute arbitrary code on affected, unpatched Windows systems. This historical issue does not mean every CAB executes code, and a signature does not replace viewer updates.
CAB files: identify, open and extract
CAB archives usually use the .cab extension and can supply files to Windows Installer, either inside an MSI or as external archives. The format contains CFHEADER, CFFOLDER, CFFILE and CFDATA structures, with little-endian multibyte integers. Its header starts with MSCF, hexadecimal 4D 53 43 46 at offset 0; the specified major and minor versions are 1 and 3.
For a CAB-to-ZIP workflow, extract the contents first and then package them with a ZIP tool. Obtain all required volumes first. Preserve directory structure; expand's `-i` ignores it. Repacking is not guaranteed to preserve Windows Installer relationships: Microsoft requires matching file keys and file sequence, so changing those may break installation behavior.
How to open it
On Windows, open Command Prompt and list entries with `expand -d "archive.cab"`. Create a destination folder, then extract all entries with `expand "archive.cab" -f:* "C:\CAB-out"`. Use `-f:filename` to select a file. On a Mac or phone, use an archive app whose documentation explicitly lists CAB support, or extract the files on Windows and transfer them. Keep the other volumes available when working with a split archive.
On Windows, open Command Prompt and list entries with `expand -d "archive.cab"`. Create a destination folder, then extract all entries with `expand "archive.cab" -f:* "C:\CAB-out"`. Use `-f:filename` to select a file. On a Mac or phone, use an archive app whose documentation explicitly lists CAB support, or extract the files on Windows and transfer them. Keep the other volumes available when working with a split archive.
For a CAB-to-ZIP workflow, extract the contents first and then package them with a ZIP tool. Obtain all required volumes first. Preserve directory structure; expand's `-i` ignores it. Repacking is not guaranteed to preserve Windows Installer relationships: Microsoft requires matching file keys and file sequence, so changing those may break installation behavior.
File safety
Treat an unfamiliar CAB cautiously and keep Windows and the viewer updated. Microsoft's MS10-019 addressed CVE-2010-0487, where opening a specially crafted signed CAB could execute arbitrary code on affected, unpatched Windows systems. This historical issue does not mean every CAB executes code, and a signature does not replace viewer updates.
An unknown sender, a name ending in two extensions, or contents that do not match the extension — check before you open it.
Converting it
For a CAB-to-ZIP workflow, extract the contents first and then package them with a ZIP tool. Obtain all required volumes first. Preserve directory structure; expand's `-i` ignores it. Repacking is not guaranteed to preserve Windows Installer relationships: Microsoft requires matching file keys and file sequence, so changing those may break installation behavior.
Convert a copy, never the original, then compare quality, metadata, and layout against what you started with.
Common questions
What is a CAB file?
A CAB file is a Microsoft compressed archive, usually ending in .cab. It can hold multiple files and compress across their boundaries; large files can span several CAB volumes.
How do I open CAB files on Windows?
In Command Prompt, run `expand -d "archive.cab"` to inspect the list. Create `C:\CAB-out`, then run `expand "archive.cab" -f:* "C:\CAB-out"` to extract the contents.
How do I open CAB files on Mac?
Use an archive app whose documentation explicitly lists CAB support, or extract the archive with expand on Windows and transfer the files to your Mac.
How do I open CAB files on a phone?
Choose an archive app whose documentation explicitly lists CAB support for your phone, or extract the archive on Windows and transfer the files you need.
What should I check when CAB extraction fails with missing volumes?
Obtain the adjacent CAB volumes from the same archive set. A large file can span multiple cabinets, so one CAB may not contain everything needed for extraction.
CAB archive versus MSI package: which should I keep for installation?
Keep the original installation package and any accompanying CAB files. A CAB stores compressed files, while Windows Installer can use it inside an MSI or externally; extracting the CAB alone does not preserve the full installation arrangement.
How do I convert CAB to ZIP without losing installation relationships?
Extract all required volumes, then create a ZIP while preserving directories. This does not guarantee installation equivalence: changing file keys or sequence may break Windows Installer relationships. Keep the original installation files.
Are signed CAB files safe to open?
A signature alone does not mean the file is safe. MS10-019 fixed a historical flaw involving specially crafted signed CAB files on affected Windows systems. Keep the viewer updated and assess the source of the archive.
How can I list CAB contents without extracting files?
On Windows, run `expand -d "archive.cab"`. The `-d` option lists entries without extracting them; use `-f:filename` when you want to select a particular file.
How can I create a CAB file with Makecab?
Windows includes Makecab.exe for creating CAB archives for installer packages. For Windows Installer use, the files' keys and order must match the package's File table requirements.
Related formats
Sources
[MS-CAB]: Cabinet File Format · Microsoft 官方格式规范
Cabinet Files · Microsoft 官方文档
expand · Microsoft 官方命令文档
Microsoft Security Bulletin MS10-019 · Microsoft 官方安全公告