Creating Cabinet Files
If you create add-ons, you can use the Cabdir utility (cabdir.exe) to combine all the folders and files in a directory into a single cabinet (.cab) file, simplifying the process of distributing files to end-users, whether they download the file from a Web site or install it from a DVD or CD. You can use a setup utility to extract and install the files for end users or explain that they can manually view and copy files in the .cab file.
Creating cab files is particularly useful when building gauges, see the Creating XML Gauges document.
To create a .cab file
- Open a Command Prompt.
- Type cabdir [switches] source_dir [dest_cab].
- source_dir is the name of the directory containing the source files.
- dest_cab is the destination cab file that will be built. If dest_cab is not specified, a cab will be created in the parent directory of source_dir with the same name as source_dir.
You can use the following switches with Cabdir.exe.
|/?||Displays help information for cabdir.exe.|
|/R||Recurse into sub directories. This is the default.|
|/R-||Does not recurse into sub directories.|
|/F||Flattens the directory structure. No subdirectory pathnames will be stored.|
|/COMPRESS||Compress all files. This is the default.|
|/NOCOMPRESS||Do not compress any files.|
|/NOCOMPRESSBGL||Compress all files except .bgl files.|
|/AUTOCOMPRESS||Compress only those files more than 10% compressible.|
|/BATCH||Allow cabdir to run with no user interface.|
|/D||Deletes non write protected files after CAB is created.|
|/V||Verbose output into MS-DOS window.|
|/X||Maximal compression at the expense of random-access. Not
recommended for normal use.