World Library  
Flag as Inappropriate
Email this Article

Cabinet (file format)

Article Id: WHEBN0000322678
Reproduction Date:

Title: Cabinet (file format)  
Author: World Heritage Encyclopedia
Language: English
Subject: Windows Installer, Comparison of archive formats, IExpress, Diskcomp, Exe2bin
Collection: Archive Formats, Windows Administration
Publisher: World Heritage Encyclopedia

Cabinet (file format)

Filename extension .cab
Internet media type application/
Uniform Type Identifier (UTI)
UTI conformation
Magic number MSCF
Developed by Microsoft
Type of format Archive file format

Cabinet (or CAB) is an archive file format for Microsoft Windows that supports lossless data compression and embedded digital certificates used for maintaining archive integrity. Cabinet files have .cab filename extensions and are recognized by their first 4 bytes MSCF. Cabinet files were known originally as Diamond files.

The CAB file format may employ the following compression algorithms:

A CAB archive can reserve empty spaces in the archive as well as for each file in the archive, for some application-specific uses like digital signatures or arbitrary data. CAB format is used by a variety of Microsoft installation technologies including Windows Installer, Setup API, Device Installer and AdvPack (used by Internet Explorer to install ActiveX components). CAB files are also often associated with self-extracting programs like IExpress and DirectX where the executable program extracts the associated CAB file. CAB files are also sometimes embedded into other files. For example, MSI and MSU files (the latter are CAB files with just another filename extension) usually included one or more embedded CAB files.


  • File structure 1
  • Software 2
  • Related formats 3
  • See also 4
  • References 5
  • External links 6

File structure

A CAB archive can contain up to 65535 CAB-folders, (not to be confused with file system folders) each can contain up to 65535 files. Internally, each CAB-folder is treated as a single compressed block, which provides more efficient compression than individually compressing each file.

Every entry in a CAB-folder has to be a file.[1] Due to this structure, it is not possible to store empty folders in CAB archives.

The following shows an example a CAB file structure, demonstrating the relationship between CAB-folders and files:

CAB file
1st CAB-folder
Path: Records/Student_01.tsv
Path: Records/Photos/Student_01.jpg
2nd CAB-folder
Path: Records/Student_02.tsv
Path: Records/Photos/Student_02.jpg

How paths should be handled is not specified in the CAB file format, leaving it to the software implementation.

  • Some affix file paths to filenames only, as if all files in a CAB archive are in a single folder. IExpress works this way, as does Microsoft Windows Explorer, which can open CAB archives as a folder.
  • Some can store the paths, and upon extraction, create folders as necessary. CABARC.EXE and EXTRACT.EXE (tools from Microsoft Cabinet SDK[2] ) as well as lcab[3] and cabextract[4] (third-party open-source tools) work this way.
  • EXPAND.EXE, only since version 6 (which is included from Windows Vista to above) can extract files to their paths. The previous versions don't do it.[5]


Software that can extract the contents of a CAB archive file are numerous, including Microsoft Windows itself (through File Explorer, Setup API, expand.exe or extract.exe) as well as well-known software such as WinZip, WinRAR or 7-Zip. However, fewer programs can create CAB archives. For a full list, see Comparison of file archivers § archive formats.

The Windows program makecab.exe is used to create CAB archives: makecab.exe ] compresses a single file into a CAB archive, while makecab.exe /F ] reads the diamond directive file (with .ddf filename extension) and creates a CAB archive containing multiple files in a flat or hierarchical structure like a file system.

Related formats

The .cab filename extension is also used by other installer programs (e.g. InstallShield) for their own proprietary archiving formats. InstallShield uses zlib for compression (see Deflate), but their headers are not the same as for Microsoft CAB files so they are incompatible and cannot be manipulated or edited with the programs that are made for standard Cabinet format. Specialized third-party utilities, such as Unshield,[6] can extract this specific proprietary format.

Microsoft Publisher has a "Pack and Go" feature that bundles a publisher document, together with all external links, into a CAB file with a .PUZ extension. These files are meant to be activated with a companion .EXE file which is distributed along with the .PUZ file. These files may be renamed and activated with any CAB file extraction program.

See also


  1. ^ Microsoft Cabinet Format
  2. ^ "Microsoft Cabinet Software Development Kit". Support. Microsoft. Retrieved 27 March 2013. 
  3. ^ "lcab". Freecode. Dice. Retrieved 27 March 2013. 
  4. ^ "cabextract". Freecode. Dice. Retrieved 27 March 2013. 
  5. ^
  6. ^ Unshield

External links

  • Microsoft Cabinet SDK - updated versions of these resources are available in the Microsoft Windows SDK
  • File Extension .CAB
  • Expand Command Reference - Windows XP Professional Product Documentation
  • Cabinet Software Development Kit (CAB SDK) - downloads of all Microsoft CAB SDK versions (free)

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from World eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.