Sample .inf File for Component Download Service

Setup-script format for .inf files
The following is a sample .inf file that demonstrates the syntax understood by the Internet Component Download service.

Note
You must use this .inf syntax to write setup scripts for Internet Component Download. Because of security, the system standard (SetupX) .inf setup is not called to install components with setup scripts; instead, the limited .inf syntax below is the only legal format for Internet Component Download.


;Sample INF file for CIRC3.OCX
[Add.Code]
circ3.ocx=circ3.ocx
random.dll=random.dll
mfc40.dll=mfc40.dll
foo.ocx=foo.ocx

[circ3.ocx]
; Lines below specify that the specified Circ3.ocx (clsid, version) needs to be installed on
; the system. If it doesn't exist already, it can be downloaded from the given location (a CAB file).
; Note: if "thiscab" is specified instead of the file location, it is assumed that the
; desired file is present in the same CAB that the .inf originated from.
; Otherwise, if the location pointed to is a different CAB, the new cabinet is also downloaded and
; unpacked in order to extract the desired file.
file=http://www.code.com/circ3/circ3.cab
clsid={9DBAFCCF-592F-101B-85CE-00608CEC297B}
;Note that the {}s are required when entering the CLSID in the .inf file. This is slightly different from the HTML
;syntax for inserting CLSIDs in an <OBJECT> tag.
FileVersion=1,0,0,143

[random.dll]
; Lines below specify that the Random.dll needs to be installed in the system.
; If this doesn't exist already, it can be downloaded from the given location.
file=http:// www.code.com/circ3/random.dll
; Note that the FileVersion is optional; it also can be left empty, which means that any version is okay.
FileVersion=
DestDir=10


; DestDir can be set to 10 or 11 ( LDID_WIN or LDID_SYS by .inf convention).
; This places files in \Windows or \Windows\System, respectively.
; If no DestDir is specified (typical case), code is installed in the Occache directory.

[mfc40.dll]
; Leaving the file location empty specifies that the installation
; needs mfc40 (version 4,0,0,5), but it should not be downloaded.
; If this file is not already present on the client computer, component download fails.
file=
FileVersion=4,0,0,5

[foo.ocx]
; Leaving the file location empty specifies that the installation
; needs the specified File.ocx (clsid, version), but it should not be downloaded.
; If this file is not already present on the client computer, component download fails.
file=
clsid={9DBAFCCF-592F-101B-85CE-00608CEC297B}
FileVersion=1,0,0,143