共用方式為


網路 INF 檔案中的 DDInstall.Services 區段

DDInstall。網路 INF 檔案中的服務區段是以一般INF DDInstall.Services 區段為基礎。

DDInstallServices區段包含一或多個AddService指示詞,每個指示詞都會參考 INF-writer-defined service-install- 區段,指定載入特定元件驅動程式之服務的方式和時機。

DDInstall。INF 檔案中需要服務區段,該檔案會安裝 Net 元件 (配接器) ;在安裝NetTransNetClientNetService元件的 INF 檔案中是選擇性的。

注意NetClient元件在 Windows 8.1、Windows Server 2012 R2 和更新版本中已被取代。

DDInstall中的AddService指示詞。Services區段也可以參考錯誤記錄檔-log-install-section,該區段會安裝元件的錯誤記錄檔。 對於所有網路元件而言,錯誤記錄檔是選擇性的。

如需詳細資訊,請參閱 INF AddService 指示詞

以下是DDInstall的範例。Services區段、service-install-sectionerror-log-install-sectionadd-registry-section,由error-log-install-section中的AddReg指示詞所參考:

[a1.ndi.NT.Services]
AddService = a1, 2, a1.AddService, a1.AddEventLog
 
[a1.AddService]
DisplayName = %Adapter1.DispName%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 2 ;SERVICE_AUTO_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %13%\a1.sys
LoadOrderGroup = NDIS
 
[a1.AddEventLog]
AddReg = a1.AddEventLog.reg
 
[a1.AddEventLog.reg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\netevent.dll"
HKR,,TypesSupported,0x00010001,7

AddService指示詞的ServiceName參數,在上述範例中是第一個AddService參數 () ,必須符合元件的Ndi\Service值。 如需詳細資訊,請參閱 將Service-Related值新增至 Ndi 索引鍵