INF DDInstall.Services セクション

各モデルごとの DDInstall.Services セクションには、INF ファイル内の追加の INF ライター定義セクションを参照する 1 つ以上の INF AddService ディレクティブ が含まれています。

[install-section-name.Services] |
[install-section-name.nt.Services] |
[install-section-name.ntx86.Services] |
[install-section-name.ntia64.Services] | (Windows XP and later versions of Windows)
[install-section-name.ntamd64.Services] | (Windows XP and later versions of Windows)
[install-section-name.ntarm.Services] | (Windows 8 and later versions of Windows)
[install-section-name.ntarm64.Services] (Windows 10 version 1709 and later versions of Windows)
 
AddService=ServiceName,[flags],service-install-section
                     [,event-log-install-section[,[EventLogType][,EventName]]]...]
[DelService=ServiceName[,[flags][,[EventLogType][,EventName]]]]...
[Include=filename.inf[,filename2.inf]...]
[Needs=inf-section-name[,inf-section-name]...] 

DDInstall.Services セクションに少なくとも1つの AddService ディレクティブを指定することで、特定のドライバのサービスをいつどのようにロードするか、他のサービスやドライバとの依存関係などを制御することができます。 必要に応じて、イベント ログ サービスを指定することもできます。

エントリ

AddService=ServiceName,[flags],service-install-section[,event-log-install-section[,[EventLogType][,EventName]]]...]
このディレクティブは、INF ライター定義の サービス インストール セクション と、場合によっては、 この DDInstall セクションの対象となるデバイスドライバーの INF ファイル内の別の場所で イベント ログ インストール セクション を参照します。 詳細については、 INF AddService ディレクティブを参照してください。

DelService=ServiceName[,[flags][,[EventLogType][,EventName]]]...
このディレクティブは、以前にインストールされたサービスをターゲット コンピューターから削除します。 このディレクティブはほとんど使用しません。 詳細については、 INF DelService ディレクティブを参照してください。

Include=filename.inf[,filename2.*inf_]...
この省略可能なエントリは、このデバイス クラスをインストールするために必要なセクションを含む 1 つ以上のシステム提供の名前付き INF ファイルを指定します。 このエントリが指定されている場合、通常は Needs エントリも指定されます。

Needs=inf-section-name[,inf-section-name]...
この省略可能なエントリは、このデバイス クラスのインストール中に処理する必要があるセクションを指定します。 通常、このセクションは DDInstall.Services セクションであり、 Include エントリーにリストされているシステム提供のINFファイル内にあります。 ただし、 DDInstall.Services セクション内で参照されるセクションであれば、どのセクションでもかまいません。

解説

DDInstall.Service セクションは、関連する DDInstall セクションと同じプラットフォームとオペレーティング・システムの装飾が必要です。 例えば、 install-section-name.ntx86 セクションは、対応する install-section-name.ntx86.Services セクションを持つことになります。

指定された DDInstall セクションは、INF ファイルの製造元ごとの Models セクションのデバイス/モデル固有のエントリで参照する必要があります。 正式な構文文に示されている install-section-name の大文字小文字を区別しない拡張は、クロスプラットフォームINFファイルの DDInstall.Services セクション名に挿入することができます。

システム定義の .nt, .ntx86, .ntia64, .ntamd64, .ntarm, および .ntarm64 の拡張機能の使用方法の詳細については、「複数のプラットフォームとオペレーティング システム用の INF ファイルの作成」を参照してください。

この例では、ファンクションドライバとフィルタドライバをデバイスに追加するドライバパッケージの例について、INFファイルの install-section-name.NT.Services セクションとそのservice-install-sectionを示します。

[Example_DDInstall.Services]
AddService=ExampleFunctionDriver,0x00000002,function_ServiceInstallSection
AddService=ExampleUpperFilter,,filter_ServiceInstallSection

[function_ServiceInstallSection]
DisplayName    = %function_ServiceDesc%
ServiceType    = 1
StartType      = 3
ErrorControl   = 1
ServiceBinary  = %13%\ExampleFunctionDriver.sys

[filter_ServiceInstallSection]
DisplayName    = %filter_ServiceDesc%
ServiceType    = 1
StartType      = 3
ErrorControl   = 1
ServiceBinary  = %13%\ExampleUpperFilter.sys

[Strings] ; only immediately preceding %strkey% tokens shown here
%function_ServiceDesc%="Example function driver service"
%filter_ServiceDesc%="Example filter driver service"

DDInstall.Services セクションと AddService ディレクティブで参照される service-install-sectionの例については INF DDInstall.HW Section を参照してください。 これには、PnP フィルター ドライバー用のものが含まれます。

関連項目

AddService

DDInstall

DDInstall.HW

DelService

Models