Cabinet Files

Last Edited

by

in

What are Cabinet Files?

Cabinet Files are files with the extension .cab that store compressed files, usually for distributing software. Cabinet files can contain multiple files in a compressed state, or a single compressed file can be spread over several cabinet files.

Cabinet Files
Cabinet Files

During installation of software, the setup program decompresses the cabinet files and copies the resulting files to the user’s system.

Cabinet files can be digitally signed using a Microsoft technology called Authenticode. This allows setup files to be downloaded safely over untrusted networks such as the Internet.

Cabinet files are compressed using a compression algorithm called MSZIP, which is based on the Lempel-Ziv algorithm.

Developers can use a cabinet file creation tool such as Makecab.exe to make cabinet files for use with installer packages. The Makecab.exe utility is included in the Windows SDK Components for Windows Installer Developers.

Developers can also use a cabinet file creation tool such as Cabarc.exe to make cabinet files for use with installer packages. This tool writes to the Diamond cabinet structure.

The file keys of the files stored inside of a cabinet file must match the entries in the File column of the File table and the sequence of files in the cabinet must match the file sequence specified in the Sequence column. For more information, see Using Cabinets and Compressed Sources.

Large files can be split between two or more cabinet files. There can be no more than 15 files in any one cabinet file that spans to the next cabinet file. For example, if you have three cabinet files the first cabinet can have 15 files that span to the second cabinet file and the second cabinet file can have 15 files that span to the third cabinet file.

The installer extracts files from a cabinet as they are needed by the installation and installs them in the same order as they are stored in the cabinet file. The space requirements for installing a file stored in a cabinet are no different than for installing an uncompressed file.

A cabinet file can be located inside or outside of the .msi file. Beginning with Windows Installer 5.0 running on Windows 7 or Windows Server 2008 R2 the installer saves any cabinets that are embedded in the .msi file before caching the installation package.

Windows Installer 4.5 or earlier: To conserve disk space, the installer always removes any cabinets that are embedded in the .msi file before caching the installation package on the user’s computer.

Search