Creating an .inf File
An .inf file consists of a number of sections that describe the target location of the files, shortcuts, and registry settings that will be contained within the .cab file.
In order for the installed application to be executed, you must define a shortcut to the executable file that resides within the .inf file. The .inf file is then placed in the Start menu. For debugging purposes, you can place applications directly into the Windows\Start Menu directory so that they may be executed. You must place dynamic-link library (.dll) files in the Windows directory.
You use macro strings to represent destination directories within the .inf file when creating an .inf file for a device installation. This is important because directories may have different names depending on the language into which the device is localized.
The following table shows the available macro strings and their corresponding directory for a device intended for an English-speaking audience.
The following table shows the sections that make up an .inf file.
|Version||Describes the creator and version of the application|
|CEStrings||Contains string substitutions for application and directory names|
|Strings||Contains string definitions for one or more strings|
|CEDevice||Describes the device platform for which the application is targeted|
|DefaultInstall||Describes the default installation of the application|
|CopyFiles||Describes the default files to copy to the target device|
|AddReg||Contains keys and values that the .cab file will add to the registry on the device|
|CEShortcuts||Contains shortcuts that the installation application creates on the device|
|SourceDisksNames||Contains the name and path of the disk on which the application resides|
|SourceDisksFiles||Contains the name and path of the files containing the application|
|DestinationDirs||Contains the names and the paths of the destination directories for the application on the target device|
The CAB Wizard can use a single .inf file and multiple application binaries to create multiple .cab files. With this feature, you can create separate .cab files for each specific processor or platform type. To indicate information for a specific processor or platform, append a unique label that indicates the platform to the following section names:
For example, when installing the .cab file application on a platform that uses the SH4 processor, use the SourceDisksNames.SH4 section name to specify the name and path of the disk on which the application resides.
Last updated on Friday, October 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.