Friday, January 30, 2009

Creating/Extracting CAB archive file on Windows

CAB archive file format




Cabinet(CAB) archive is Microsoft file format. CAB files are compressed packages containing a number of related files. The format of a cabinet file is optimized for maximum compression. Cabinet files support a number of compression formats, including MSZIP, LZX, or uncompressed.

CAB is the Microsoft Windows native compressed archive format. It supports compression and digital signing, and is used in a variety of Microsoft installation engines: Setup API, Device Installer, AdvPack (for the installation of ActiveX components from Internet Explorer) and Windows Installer. It was originally called Diamond. Its .CAB file extension and overall file format name comes from word cabinet, internally used by Microsoft tools dealing with CAB files to reference such files. The CAB file format allows for three data compression methods: DEFLATE, invented by Phil Katz, the author of the ZIP file format. Quantum, licensed from David Stafford, the author of the Quantum archiver. LZX, invented by Jonathan Forbes and Tomi Poutanen, given to Microsoft when Jonathan joined the company. Usually CAB file contains one or more files and also could also reserve some empty space in file header for some specific uses like placing digital signatures or arbitrary data.

CAB files are also often attached to self-extracting programs where executable program extracts attached CAB file. Also CAB files sometimes embedded into other files, for example MSI files usually contain one or more CAB files embedded. You can easily recognize Microsoft CAB files since all CAB files have specific marker at begin of file, identifying file format. For Microsoft CAB files this marker is a four-letter tag MSCF at start of CAB file.

The CAB file extension is also used in many installers (InstallShield and others), although it is not the same file format. InstallShield's files are usually using zlib for compression (see Deflate) but their headers are not same as in MS CAB files so they are incompatible. InstallShield's format cannot be manipulated or edited with most, or possibly any, of the tools that can edit the above file formats. However there are utilities, such as Unshield, that can extract this specific proprietary format.


Using WinTar






WinTar is a simple and cute 32-bit Windows version tarball archiver - a powerful tool which allows Windows users to create, manage and extract most popular Unix/Linux tarball and windows CAB format archive files.
WinTar can create and read several different archive formats, including most popular tar variants, several cpio formats, and both BSD and GNU ar variants. It can also write shar archives and read ISO9660 CDROM images.

WinTar can create and read/extract Windows CAB archive files and ZIP files.


Introduction: http://www.miscosoftware.com/WinTar/wintar.htm

Download: http://www.miscosoftware.com/WinTar/store/WinTar.exe

Creating CAB archive file:





When WinTar is running, it displays a list of files and folders in the current folder. Navigate to the folder that you want to add files and folders to the archive. After you select the files and folders and then do the following:

  • Select menu File New archive and then select the archive file format from the popup menu, CAB File. or

  • Click the main toolbar button New popup tag. When the popup menu displayed, select the CAB File.

These two methods will display the New Achive dialog. Navigate the folder you want to save the archive file, enter the archive file name in the File Name text box. At this point, you also have a chance to select the target archive format at the next Save File Type and Archive Format combo boxes. You may select the anyone compression method from the Compression combo Box, e.g. gzip,bzip2 except None or leave it as Using global options. Select None method, the archive will perform but do not apply compression, including Zip and CAB archive.

After click the OK button at the New Archive dialog, If you have selected files and/or folders on the first step, the Archive File Option dialog will display (the Globle Options controls this behavior).


After select some archive options and click OK button, the archive process starts.

Extracting CAB archive files



In order to extract CAB files using WinTar you must first open the required archive or select the archive file in File List pane window. This may be achieved in one of several ways:

  • Target the archive file in the file list pane and select the archive file.
  • Double-click or press Enter on the archive name in Windows shell (Explorer or Desktop). If WinTar was associated with archives, an archive will be opened in WinTar. You may associate WinTar with archives after installation using File Association dialog;
  • Double-click or press Enter on the archive name in WinTar window;
  • Run WinTar from the command line with a single parameter - the archive name.

If an archive is opened in WinTar, its contents are displayed. Select files and folders, which should be extracted. You may do this using Shift + arrow keys or Shift + left mouse button as in Windows Explorer and other Windows programs.


Having selected one or more files, select File Extract Archive menu or click Extract to button at the main toolbar, or press Alt+E , enter the destination folder in the dialog box and click on OK. This dialog box also offers a few advanced options for archive extraction.

After setting the advanced option, archive extrcting will start.

Other Articles



Creating/Extracting Zip archive files using WinTar

Extracting files from ISO image file

Creating Unix/Linux Shar archive files on Windows System

Creating Unix/Linux tar, tar.gz archive on Windows System

How to create/extract CPIO archive files on Windows

Create Unix Pax archive files on MS Windows system