The following code example shows a typical .inf file.
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"
[CEDevice.SH3]
ProcessorType = 10003 ; SH3 microprocessor
[CEDevice.MIPS]
ProcessorType = 4000 ; MIPS microprocessor
[DefaultInstall] ; Required section
AddReg = RegSettings.All
CEShortcuts = Shortcuts.All
[DefaultInstall.SH3]
CopyFiles = Files.Common, Files.SH3
[DefaultInstall.MIPS]
CopyFiles = Files.Common, Files.MIPS
[SourceDisksNames] ; Required section
1 = ,"Common files",,C:\app\common ; Using an absolute path
[SourceDisksNames.SH3]
2 = ,"SH3 files",,sh3 ; Using a relative path
[SourceDisksNames.MIPS]
2 = ,"MIPS files",,mips ; Using a relative path
[SourceDisksFiles] ; Required section
begin.wav = 1
end.wav = 1
sample.hlp = 1
[SourceDisksFiles.SH3]
sample.exe = 2 ; Uses the SourceDisksNames.SH3
; identification of 2.
[SourceDisksFiles.MIPS]
sample.exe = 2 ; Uses the SourceDisksNames.MIPS
; identification of 2.
[DestinationDirs] ; Required section
Shortcuts.All = 0,%CE3% ; \Windows\Desktop
Files.Common = 0,%CE2% ; \Windows
Files.SH3 = 0,%InstallDir%
Files.MIPS = 0,%InstallDir%
DefaultDestDir = 0,%InstallDir%
[CEStrings] ; Required section
AppName = My Test App
InstallDir = %CE1%\%AppName%
[Strings] ; Optional section
reg_path = Software\Microsoft\My Test App
[Shortcuts.All]
Sample App,0,sample.exe ; Uses the path in DestinationDirs.
Sample App,0,sample.exe,%InstallDir% ; The path is explicitly specified.
[Files.Common]
begin.wav,,,0
end.wav,,,0
Sample Help File.hlp,sample.hlp,,0 ; Rename the destination file.
[Files.SH3]
sample.exe,,,0
[Files.MIPS]
sample.exe,,,0
[RegSettings.All]
HKLM,%reg_path%,,0x00000000,alpha ; <default> = "alpha"
HKLM,%reg_path%,test,0x00010001,3 ; test = 3
HKLM,%reg_path%\new,another,0x00010001,6 ; new\another = 6