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.
Macro Strings
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.
Macro string | Directory |
---|---|
%CE1% | Program Files |
%CE2% | Windows |
%CE4% | Windows\StartUp |
%CE5% | My Documents |
%CE8% | Program Files\Games |
%CE11% | Windows\Start Menu\Programs |
%CE14% | Windows\Start Menu\Programs\Games |
%CE15% | Windows\Fonts |
%CE17% | Windows\Start Menu |
Sections
The following table shows the sections that make up an .inf file.
Section | Description |
---|---|
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:
- CEDevice
- DefaultInstall
- SourceDisksNames
- SourceDisksFiles
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.
See Also
CAB Wizard Overview | CAB Wizard Syntax
Last updated on Friday, October 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.