Sample INF


The following sample INF performs the following actions:


[Version]
Signature=$CHICAGO$

[DestinationDirs]
SampleCopy=24,%PROGRAMF%\Sample
SampleDel=24,%PROGRAMF%\Sample
SampleWinCopy=25
SampleSysCopy=11
SampleINFCopy=17
SampleHLPCopy=18

[DefaultInstall]
CopyFiles=SampleCopy,SampleWinCopy,SampleSysCopy,SampleINFCopy,SampleHLPCopy
AddReg=SampleRegisterApp,SampleRegUninstall,SampleRenameFiles
UpdateInis=SampleAddLinks

[RemoveSample]
DelFiles=SampleWinCopy,SampleSysCopy,SampleINFCopy,SampleHLPCopy
DelReg=SampleUnRegisterApp,SampleRegUninstall
AddReg=SampleRemoveLFNs
UpdateInis=SampleRemoveLinks

[SampleCopy]
sample.bmp

[SampleWinCopy]
sample.exe

[SampleSysCopy]
sample.dll

[SampleINFCopy]
sample.inf

[SampleHLPCopy]
sample.hlp

[SampleRegisterApp]
;Make arbitrary registry entry (for private use of sample.exe)
HKLM,Software\Sample,Installed,,"1"

[SampleUnRegisterApp]
;Delete registry entry (note that this deletes the entire key)
HKLM,Software\Sample

[SampleRegUninstall]
;Add entry to the Add-Remove Programs control panel to uninstall the program:
HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sample,"DisplayName",,"Sample Application"
HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sample,"UninstallString",,"RunDll setupx.dll,InstallHinfSection RemoveSample 4 sample.inf"

[SampleRenameFiles]
;renames 8.3 files to Long File Names
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Sample,,,"%24%\%PROGRAMF%\Sample"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Sample,sample.bmp,,"Sample Bitmap.bmp"

[SampleRemoveLFNs]
;Deletes files with Long File Names during Uninstall
HKLM,Software\Microsoft\Windows\CurrentVersion\DeleteFiles\Sample,,,"%24%\%PROGRAMF%\Sample"
HKLM,Software\Microsoft\Windows\CurrentVersion\DeleteFiles\Sample,sample.bmp,,"Sample Bitmap.bmp"

[SampleAddLinks]
;Adds shortcut to SAMPLE.EXE on the Start Menu:
setup.ini,progman.groups,,"Sample=%SampleFolder%" ;creates folder
setup.ini,Sample,,"""%SampleDesc%"",%25%\SAMPLE.EXE" ;creates link

[SampleRemoveLinks]
;Removes shortcut to SAMPLE.EXE on the Start Menu during Uninstall:
setup.ini, progman.groups,, "Sample=%SampleFolder%" ;creates folder
setup.ini, Sample,, """%SampleDesc%""" ;deletes link

[SourceDisksNames]
1=%DiskName%,Sample,0

[SourceDisksFiles]
sample.exe=1,,13456
sample.dll=1,,20987
sample.bmp=1,,64098
sample.hlp=1,,55441
sample.inf=1,,5687

[Strings]
PROGRAMF="PROGRA~1"
SampleFolder="Samples"
SampleDesc="Sample Application"
DiskName="Sample Application Installation Disk"