By default, there are 3 utility files for dealing with cab files. They are
You can find these in the system32 directory. Each of these have its own story why it's there. makecab and expand utilities are command line versions and extrac32 runs in its own Window. No matter which of them we use, we have to call from the command line(command prompt).
Creating a cab archive
makecab.exeOpen command prompt and type in
makecabThis displays the help screen with details how to call the utility and what parameters to be used
makecab [filename]Compressed cabinet file will be saved in the same directory of the source file.
One of the big disadvantage here is that we cannot include multiple files directly. To do that, we have to create a directive file called a Diamond Directive File(DDF) and include instructions in it. To get the whole thing automatically done, use iexpress.exe.
Extracting a cab archive
For help on usage, type in
To extract all files in an archive
expand -F:* [filename] [\destination]
Refer the documentation for more details.
Unlike expand.exe, this was intended for use with Microsoft Internet Explorer. Later, it became a part of the Windows installation. As this is not a console application, it's not very interactive with command line. Typing 'extrac32' without any parameters will simply load the utility which will terminate immediately.
To read the directives, enter
As you can see, there is a lot of facilities with this tool. Try playing around a bit and figure them out.
That's it for native Windows cab tools. Additionally, you may download the Cabinet SDK if you wish to study/utilize more of cabinet files. Most of the time we don't realize we already have the tools we are looking for. These cab tools are just another example. Knowing the tools you already have will someday save you the day.