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

The most common operations for installing an application are copying files and setting registry keys. These and other instructions can be placed into an information (.inf) file that describes where files should be placed and which registry keys should be created or modified.

On Windows Mobile the information file uses the Microsoft Win32® Setup format with Windows Mobile-specific modifications.

On Windows Embedded CE the information file uses the Microsoft Win32® Setup format with Windows Embedded CE-specific modifications. Information files are text-based and can be created with any text editor.

The CAB Wizard uses the .inf file to construct a file called _setup.xml, which gives instructions on how the application should be installed. The .inf file is parsed to determine which finalized application files should be packaged.

The .cab file is then created and formatted for the target device.

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, destination filenames that are used in the .inf file, and both the AppName in [CEStrings] and the Provider in [Version] that are used in the .inf file.

An .inf file consists of a number of sections which describe the installation tasks. These tasks include descriptions of the target location of the files, shortcuts, and registry settings that the .cab file will contain. Not all these sections are required to create a valid .inf file.

Note:
For Windows Mobile, files that are packaged into a .cab file to be installed on a device are stored by file name, without regard to their installation directory. For this reason, if multiple files within a .cab are given the same name but different install directories, only one of the files will be installed in all locations. To work around this behavior, be sure to use unique names for all files within a single .cab file.

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

This is also useful if you are using the same set of application binaries to create multiple .cab files targeted at multiple platforms. However, that requires you to use a [Platform] section to specify the targeted platforms and multiple [CEDevice] sections in the .inf file to separate the targeted platforms into their respective .cab files. For more information, see Platformand CEDevice.

To indicate information for a specific processor or platform, append a unique label that indicates the selected platform to the following section names:

CEDevice

DefaultInstall

SourceDisksNames

SourceDisksFiles

Platform

For example, when installing the .cab file application on a Windows Mobile powered PDA, use the SourceDisksNames.PPCsection name to specify the name and path of the hard disk where the application resides.

For more information about the platforms and processors that you can target, see Platform Type Referenceand Processor Type Reference.

The following table shows the sections that can make up an .inf file.

Section Required Description

Version

Yes

Describes the creator and version of the application.

Platform

No

Describes the platform version that the application is targeted for.

CEStrings

Yes

Contains string substitutions for application and directory names.

Strings

No

Contains string definitions for one or more strings.

CEDevice

No

Describes the hardware platform that the application is targeted for.

DefaultInstall

Yes

Describes the default method used to install the application.

CopyFiles

Yes

Specifies the list of files that the .cab file copies to the target device.

Appears in the DefaultInstall section.

AddReg

No

Specifies the keys and values that the .cab file adds to the registry on the target device.

Appears in the DefaultInstall section.

CEShortcuts

No

Specifies the shortcuts that are created on the target device.

Appears in the DefaultInstall section.

SourceDisksNames

Yes

Contains the name and path of the directories on the hard disk where the application files reside.

SourceDisksFiles

Yes

Contains the source filenames of the files that comprise the application.

DestinationDirs

Yes

Contains the names and paths of the destination directories for the application on the target device.

See Also