Cabinet File Extraction Sample

This sample is located in \Samples\Packaging\Extract.

Description
Using the Sample
Key Project Files
Technologies Demonstrated

Description

This sample provides a tool for extracting files from cabinet files. The tool, extract, also includes an option for listing the files in a cabinet file without extracting them.

Using the Sample

To compile the sample

Use Nmake.exe to compile the makefile in the \Samples\Packaging\Extract directory.

To use the sample

Use the following command to run the extract tool:

jview Extract <cabinet file>

The \Samples\Packaging\Extract directory includes a sample cabinet file, Sample.cab, that you can use with the extract tool. Sample.cab contains one file, Hello.java.

Key Project Files

Extract.java

This code processes the user's command and determines whether to list the cabinet files, extract them, or display Help on the extract tool. The code uses CabDecoder class methods to enumerate the contents of the cabinet file or to extract them. This file also contains the code for displaying Help on the extract tool.

Technologies Demonstrated

Packaging

© 1999 Microsoft Corporation. All rights reserved. Terms of use.