コンポーネント ダウンロード サービス用の .inf ファイルのサンプル

.inf のセットアップ スクリプトのフォーマット
次の .inf ファイルは、コンポーネント ダウンロード サービスが解釈できる構文を示したサンプル ファイルです。

注意
インターネットでコンポーネントのダウンロードを行う際は、この .inf ファイルの構文に従って、セットアップ スクリプトを作成する必要があります。セキュリティ上の理由により、セットアップ スクリプトでコンポーネントをインストールする場合、システムで標準の .inf セットアップ (SetupX) は使用しません。インターネットでコンポーネントのダウンロードを行う際は、次に示す制限付きの .inf 構文が唯一の有効なフォーマットです。


;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 machine, 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 machine, component download fails.
file=
clsid={DEADBEEF-592F-101B-85CE-00608CEC297B}
FileVersion=1,0,0,143