Information (.inf) File Overview (Compact 2013)

3/26/2014

You use an information (.inf) file to describe where files are placed and which registry keys are created or modified in an OS design.

On Windows Embedded Compact the information file uses the Microsoft Win32 Setup format with Windows Embedded Compact-specific modifications.

The following sections of an .inf file are specific to Windows Embedded Compact.

  • Version
    Describes the creator and version of the application.
  • Platform
    [Optional] Describes the platform version that the application is targeted for.
  • CEStrings
    Contains string substitutions for application and directory names.
  • Strings
    [Optional] Contains string definitions for one or more strings.
  • CEDevice
    [Optional] Describes the hardware platform that the application is targeted for.
  • DefaultInstall
    Describes the default method used to install the application.
  • CopyFiles
    Specifies the list of files that the .cab file copies to the target device.

    Appears in the DefaultInstall section.

  • AddReg
    [Optional] Specifies the keys and values that the .cab file adds to the registry on the device.

    Appears in the DefaultInstall section.

  • CEShortcuts
    [Optional] Specifies the shortcuts that are created on the device.

    Appears in the DefaultInstall section.

  • SourceDisksNames
    Contains the name and path of the directories on the hard disk where the application files reside.
  • SourceDisksFiles
    Contains the source filenames of the files that comprise the application.
  • DestinationDirs
    Contains the names and paths of the destination directories for the application on the device.

Example

The following code sample shows an information (.inf) file that can be used as a template for the common operations that are required for installing an application that is not targeted at specific hardware platforms.

[Version]
Signature   = "$Windows NT$"        ; required as-is
Provider    = "Microsoft"           ; maximum of 30 characters, full app name will be "<Provider> <AppName>"
CESignature = "$Windows CE$"        ; required as-is
 
[CEStrings]
AppName     = "Mine Sweeper"        ; maximum of 40 characters, full app name will be "<Provider> <AppName>"
InstallDir  = %CE1%\%AppName%       ; Program Files\Mine Sweeper
 
[SourceDisksNames]                  ; directory that holds the application's files
1 = , "Common Files",,Common
 
[SourceDisksFiles]                  ; list of files to be included in .cab
bigexpl.wav = 1
miniwin.wav = 1
winmine.exe = 1
 
[DefaultInstall]                    ; operations to be completed during install
CopyFiles   = CopyToProgramFiles
AddReg      = RegData
CEShortcuts = Shortcuts   
 
[DestinationDirs]                   ; default destination directories for each operation section
CopyToProgramFiles    = 0, %InstallDir%
Shortcuts   = 0, %CE14%             ; \Windows\Start Menu\Programs\Games
 
[CopyToProgramFiles]                ; copy operation file list
"winmine.exe", winmine.exe
"miniwin.wav", miniwin.wav
"bigexpl.wav", bigexpl.wav
 
[RegData]                           ; registry key list
HKCU,Software\%AppName%,MajorVersion,0x00010001,1
HKCU,Software\%AppName%,MinorVersion,0x00010001,0
 
[Shortcuts]                         ; Shortcut created in destination dir, %CE14%
%AppName%,0,winmine.exe

See Also

Reference

CAB Wizard