Re: Windows CE .inf syntax/guide
- From: Silver <thesilverring@hot>
- Date: Mon, 08 May 2006 17:17:39 -0700
I'd credit the original author of this if I knew who it was, but I found this cheat *** quite handy.
Nice one geezer,
Silver
--
Processor-Specific Sections
The .CAB files created using an .inf are processor specific: Each one can be used with only one type of processor. To create processor-specific CAB files, you must append the processor type extension to some of the section names.
For example:
[DefaultInstall] - shared by all platforms
[DefaultInstall.sh3] - specific to the SH3 processor
[DefaultInstall.mips] - specific to the MIPS processor
The following sections can be appended with a processor-specific extension:
[CEDevice]
[DefaultInstall]
[SourceDisksNames]
[SourceDisksFiles]
INF Sections Used
An .inf file is made up of a number of sections, each of which starts with a section name in [brackets].
[Version]
Signature="signature-name"
Provider=provider-name
CESignature="$Windows CE$"
Signature - must be one of "$Windows NT$", "$Chicago$", or "$Windows 95$".
Provider - name of the software provider.
CESignature - must be included, and specified as above.
[CEDevice] *
[ProcessorType=processor-type]
[UnsupportedPlatforms=platform-family-name [ , platform-family-name]]
[VersionMin=[major_version.minor_version]]
[VersionMax=[major_version.minor_version]]
[BuildMin=[build-number]]
[BuildMax=[build-number]]
All of the above keys are optional.
ProcessorType - The numeric processor type returned by SYSTEMINFO.dwProcessorType. SH3 processors normally have a value of 10003, and MIPS processors have a value of 4000.
UnsupportedPlatforms - A list of platform family names that is known to be unsupported, i.e. "hpc" or "gryphon". It the connected device is listed here, the Application Manager will not display the application.
VersionMin,VersionMax - The version returned by OSVERSIONINFO.dwVersionMajor and OSVERSIONINFO.dwVersionMinor.
BuildMin, BuildMax - The build information returned by OSVERSIONINFO.dwBuildNumber.
[DefaultInstall]
CopyFiles=file-list-section [ , file-list-section]...
AddReg=add-registry-section [ , add-registry-section]...
CEShortcuts=shortcut-list-section [ , shortcut-list-section]...
CESetupDLL=[DLL-filename]
CESelfRegister=DLL-filename [ , DLL-filename]
CopyFiles - a list of [CopyFiles] sections (see below) to be used.
AddReg - a list of [AddRegistry] sections (see below) to be used.
CEShortcuts - a list of [CEShortcuts] sections (see below) to be used.
CESetupDLL - an ISV-created "Setup.DLL" that exports functions to be called during installation onto the WindowsÆ CE device.
CESelfRegister - a list of self-registering DLLs to be installed. "DllRegisterServer()" will be called during installation, and "DllUnregisterServer()" will be called during uninstallation.
[SourceDisksNames]
disk-ordinal= , disk-label , , path
..
..
..
This section identifies and names the disk that contains the source files for file copying operations. The source files are listed in the [SourceDisksFiles] section (see below).
disk-ordinal - a unique number that identifies a source disk. If there is more than one source disk, each must have a unique ordinal.
disk-label - the label assigned to the source disk.
path - specifies the absolute path to the files on the source disk.
[SourceDisksFiles]
filename=disk-ordinal [ , subdir]
..
..
..
This section names the source files used during installation and identifies the source disks that contain the files. The source disks are listed in the [SourceDisksNames] section (see above).
filename - name of the file to be installed
disk-ordinal - the ordinal number of the source disk where the file can be found. The ordinal number is specified in the [SourceDisksNames] section (see above).
subdir - optional parameter that specifies a subdirectory on the source disk where the file can be found.
[DestinationDirs]
file-list-section=0, subdir
..
..
..
This section defines the destination directories for the operations specified in the [CopyFiles] and [CEShortcuts] sections (see below).
file-list-section - the name of [CopyFiles] or [CEShortcuts] section that contains the names of the files/shortcuts to be copied to the destination directory.
subdir - name of the destination directory to use. For WindowsÆ CE Version 2.0, this directory name can contain string macros for certain system directories, as defined below. Note that the macros are different for H/PCs and P/PCs, and that P/PCs do not support all of the macros.
Macros for Handheld PCs (H/PCs)
%CE1% \Program Files
%CE2% \Windows
%CE3% \Windows\Desktop
%CE4% \Windows\Startup
%CE5% \My Documents
%CE6% \Program Files\Accessories
%CE7% \Program Files\Communication
%CE8% \Program Files\Games
%CE9% \Program Files\Information Manager
%CE10% \Program Files\Office
%CE11% \Windows\Programs
%CE12% \Windows\Programs\Accessories
%CE13% \Windows\Programs\Communication
%CE14% \Windows\Programs\Games
%CE15% \Windows\Fonts
%CE16% \Windows\Recent
%CE17% \Windows\Favorites
Macros for Palmsize PCs (P/PCs)
%CE1% \Program Files
%CE2% \Windows
%CE3% ***Not Defined***
%CE4% \Windows\Startup
%CE5% \My Documents
%CE6% \Program Files\Accessories
%CE7% \Program Files\Communication
%CE8% \Program Files\Games
%CE9% ***Not Defined***
%CE10% ***Not Defined***
%CE11% \Windows\Start Menu\Programs
%CE12% \Windows\Start Menu\Programs\Accessories
%CE13% \Windows\Start Menu\Programs\Communication
%CE14% \Windows\Start Menu\Programs\Games
%CE15% \Windows\Fonts
%CE16% ***Not Defined***
%CE17% \Windows\Start Menu
[CopyFiles]
destination-file-name [ , source-file-name] [ , ,flag]
..
..
..
This section specifies files to be copied to the WindowsÆ CE device during installation. The actual file section name ("CopyFiles") is user-defined, and may vary.
destination-file-name - name of the destination file to be created.
source-file-name - optional parameter that specifies the name of the source file, if it is different than the name of the destination file.
flag - optional flag that controls how the files are copied. The following flags are supported for WindowsÆ CE Version 2.0:
COPYFLG_WARN_IF_SKIP 0x00000001
COPYFLG_NOSKIP 0x00000002
COPYFLG_NO_OVERWRITE 0x00000010
COPYFLG_REPLACEONLY 0x00000400
The following new flags are CE-specific:
CE_COPYFLG_NO_DATE_DIALOG 0x20000000
Do not copy if target is newer
CE_COPYFLG_NODATECHECK 0x40000000
Ignore date and overwrite target
CE_COPYFLG_SHARED 0x80000000
Reference-counting shared DLL
[CEShortcuts] *
shortcut-file-name, type-flag, target-file/path [ , standard-destination-path]
..
..
..
This section specifies shortcuts to be created on the Windows CE device during installation. The actual shortcut section name ("CEShortcuts") is user-defined, and may vary.
shortcut-file-name - the name of shortcut file to be created. This name does not require the ".lnk" extension.
type-flag - if 0 or empty, the target is a file. Any non-zero value indicates that the target is a pathname.
target-file/path - if the target is a file, the target file name must be defined in a [CopyFiles] section (see above). If the target is a path, the path name must either be defined in [DestinationDirs], or set to %InstallDir%.
standard-destination-path - optional parameter that specifies either one of the standard %CE% paths (see [DestinationDirs] section above), or %InstallDir%.
[AddRegistry]
reg-root-string, [subkey], [value-name], [flags], [value]
..
..
..
This section specifies registry entries to be created on the Windows CE device during installation. The actual registry section name ("AddRegistry") is user-defined, and may vary.
reg-root-string - can be one of: HKCR (same as HKEY_CLASSES_ROOT), HKCU (same as HKEY_CURRENT_USER), HKLM (same as HKEY_LOCAL_MACHINE), or HKU (same as HKEY_USERS).
subkey - optional parameter that specifies a sub-key to be created under the root key.
value-name - optional parameter that specifies the name of the value to be created under the specified key. If left empty, the default value for the key is set.
flags - flag the determines how the key/value is created, and the type of the value. The supported flags are:
FLG_ADDREG_BINVALUETYPE 0x00000001
FLG_ADDREG_NOCLOBBER 0x00000002
FLG_ADDREG_TYPE_SZ 0x00000000
FLG_ADDREG_TYPE_MULTI_SZ 0x00010000
FLG_ADDREG_TYPE_BINARY 0x00000001
FLG_ADDREG_TYPE_DWORD 0x00010001
value - optional value to set. This parameter can be either a string or a number in hexadecimal notation.
[CEStrings] *
AppName=application-name
InstallDir=default-installation-directory
application-name - the name of the application being installed.
default-installation-directory - the path to the directory to use as the default installation directory. This string is used for the %InstallDir% macro, required for many of the sections described above. When specifying this string, the standard %CE% macros (see [DestinationDirs] above) can be used.
[Strings]
string-name=value
..
..
..
This section defines custom string macros to be used when the INF file is compiled.
string-name - The name of the new macro you want to create. For example, a value of "Provider" will allow you to use the newly created "%Provider%" macro anywhere in the INF file.
value - The value that the string macro will expand to.
Michael_Burgess wrote:
Hi there,.
I'm working on quite a hefty .inf file for our Windows CE CAB installer
package and spent a lot of today adding about 35 reg keys plus
refactoring some of the bloat in it.
I got it sorted in the end, but not without a lot of swearing and
ballache.
Somewhere on the net, is there a useful and comprehensive guide to all
aspects of them?
Google is just returning complete tripe.From top to tail, including full [RegData] syntax. MSDN is useless and
Next time I work on the file I want to be able to do it plain sailing.
Any suggestions?
Nice one,
Mike.
- Follow-Ups:
- Re: Windows CE .inf syntax/guide
- From: Michael_Burgess
- Re: Windows CE .inf syntax/guide
- References:
- Windows CE .inf syntax/guide
- From: Michael_Burgess
- Windows CE .inf syntax/guide
- Prev by Date: Windows CE .inf syntax/guide
- Next by Date: registry
- Previous by thread: Windows CE .inf syntax/guide
- Next by thread: Re: Windows CE .inf syntax/guide
- Index(es):