內備軍區長服務科

每個模型都有 DDInstall。服務 區段包含一個或多個 INF AddService 指令 ,這些指令會參考 INF 檔案中其他 INF 寫入者定義的區段。

[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。服務區至少 包含一項 AddService 指令,用以控制特定駕駛員的服務載入方式與時間、對其他服務或驅動程式的依賴性等。 您也可以選擇指定事件記錄服務。

Entries

AddService=ServiceName, [flags],service-install-section[,event-log-install-section[,[EventLogType][,EventName]]]...

此指令參考 INF 撰寫者定義的 服務安裝區段 ,以及可能在 INF 檔案中其他地方的 事件日誌安裝區段 ,針對本 DDInstall 區段涵蓋的裝置驅動程式。 欲了解更多資訊,請參閱 INF新增服務指令。

德爾塞爾服務=ServiceName [,[flags][,[EventLogType][,EventName]]]...

此指令會從目標電腦移除先前安裝的服務。 這個指令很少被使用。 欲了解更多資訊,請參閱 INF代理服務指令。

包括=filename.inf [,filename2.inf]...

此選用條目指定一個或多個系統提供的 INF 檔案,包含安裝此裝置所需的區段。 如果這個條目被指定,那麼 需求條目 也一樣。

需求=inf-section-name [,inf-section-name]...

此選用條目指定安裝此裝置時必須處理的區段。 通常,該區段為 DDInstall。系統提供的 INF 檔案中服務區段 ,該檔案列於 包含 項目中。 不過,它可以是 DDInstall 中被引用的任何部分。服務 區。

Remarks

DDInstall。服務 區塊應擁有與其相關的 DDInstall 區塊相同的平台與作業系統裝飾。 例如, 安裝區段名稱。NTX86 區段會有對應的 安裝區段名稱。NTX86。服務 區。

指定的 DDInstall 區段必須在 INF 檔案的「各製造商 模型 」區塊中,以特定裝置/型號的條目引用。 正式語法陳述中顯示的 安裝區段名稱 不區分大小寫的擴展,可以插入此類 DDInstall。跨平台 INF 檔案中的服務 區名稱。

欲了解更多關於如何使用系統定義的 .nt、 .ntx86、 .ntia64、 .ntamd64、 .ntarm 及 .ntarm64 擴充名的資訊,請參閱「 為多個平台與作業系統建立 INF 檔案」。

Examples

此範例顯示 安裝區段名稱。NT。服務區段 及其服務安裝區段,包含一個範例驅動程式套件,該套件為裝置新增函式驅動程式與過濾器驅動程式。

[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 的範例請參見 INF DDInstall.HW 章節。服務區段中包含一些由 AddService 指令參考的服務安裝區段,其中包括一個用於 PnP 過濾驅動程式的區段。

也請參閱