Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
Windows Mobile Supported Windows Embedded CE Supported
4/14/2010

When you finish developing your driver or application, you can use the CAB Wizard to create cabinet (.cab) files to facilitate installation of your driver or application on devices. This file acts as a container, holding all necessary device driver or application files in one location, which ensures that these files are present at installation.

You create a .cab file by first using a text editor to create an .inf file and then using the CAB Wizard command-line tool (Cabwiz.exe) at the command prompt. For Windows Embedded CE, the CAB Wizard is typically found in <Platform Builder installation path>\CEPB\Bin.

This results in the creation of an unsigned .cab file. For more information, see Information File.

Note:
For Windows Mobile, you can run the CAB Wizard on a development workstation that uses an Unicode file structure, and the .inf files used to create the .cab file can contain Unicode characters and refer to other files that contain Unicode characters. However, some strings and values in the .inf file can only use Unicode characters that can be converted to ANSI characters without data loss to enable backward compatibility. This includes registry keys and values, and destination filenames that are used in the .inf file. CAB files and the Registry Configuration Service Provider fail if a registry value is set outside the range of signed integers.

For Windows Mobile, for information about signing a .cab file, see .cab File Signing Requirements.

For Windows Mobile, for information about the mechanisms that you can use to install an application using a .cab file, see Delivering Applications.

The following example shows the command-line syntax for the CAB Wizard:

Copy Code
"
inf_file" [
dest_dir] [
err_file]
[
cpu_type [
hardware_platform_label]] [
platform_label [
platform_label]]

Parameters

inf_file

Full path and filename to the CAB Wizard setup .inf file.

Note:
This file must be UTF-8 encoded if it contains extended characters.
/dest

Specifies that there is an user-selected destination directory for the .cab files, using the directory called out in dest_dir.

dest_dir

Destination directory for the .cab files.

The default destination is the inf_filedirectory where the CAB Wizard setup .inf file is located.

/err

Creates a log file using the file name that err_filespecifies.

err_file

File name for a log file containing all warnings and errors that are encountered when the .cab files are compiled.

/cpu

Creates a .cab file for each processor type that you specify.

cpu_type

An arbitrary label that you use to differentiate between different processor types in the setup .inf file. For more information, see CEDevice.

hardware_platform_label

Creates a .cab file for each hardware platform label that you specify.

A hardware platform label is an arbitrary label that is used in the Win32 setup .inf file to differentiate between different hardware platform types. For more information, see CEDevice.

/platform

Creates a .cab file for each platform label that you specify in the associated .inf file. Use this parameter only if the associated .inf file contains a [CEDevice] section. Otherwise, creation of the .cab file does not succeed. For more information, see Platformand CEDevice.

platform_label

The label that specifies the platform type.

A platform label is an arbitrary label that is used in the setup .inf file to differentiate between different platform types. For more information, see Platform.

/nouninstall

Specifies that the application does not appear in the Remove Programs dialog on the target device. When used, the associated application cannot be uninstalled.

/compress

Specifies that the .cab file created is compressed.

For Windows Mobile:

Note:
Do not use this parameter if you want to install the .cab file on devices using platforms earlier than Pocket PC for Windows Mobile Version 5.0.

Remarks

Since the CAB Wizard can use a single .inf file and multiple application binaries to create multiple .cab files, you can use the cpu_typeand hardware_platform_labelparameters to help create a separate .cab file for each specific processor or platform type that you specify. For more information, see Information File.

The following code example creates a .cab file for an ARM-family processor, assuming that the setup .inf file contains the associated hardware platform label MyARMDevice:

Copy Code
cabwiz.exe  "c:\myfile.inf"  /err myfile.err  /cpu  MyARMDevice

The following code example creates two .cab files for the ARM-family processor and the processor associated with your Emulator, assuming that the setup .inf file contains the MyARMDevice and MyEMUL hardware platform labels:

Copy Code
cabwiz.exe MyFile.inf /cpu MyARMDevice MyEMUL

See Also