共用方式為


PSHED Plug-Ins的 INF 檔案

PSHED 外掛程式是由 INF) 檔案 (資訊所安裝。 PSHED 外掛程式的 INF 檔案包含下列標準 INF 檔案區段:

INF 版本區段

INF SourceDisksNames 區段

INF SourceDisksFiles 區段

INF DestinationDirs 區段

INF 製造商區段

INF Models 區段

INF DDInstall 區段

INF DDInstall。服務區段

INF 字串區段

[INF 模型 ] 區段中,平臺廠商可以使用 PSHED 外掛程式的任何 硬體識別碼 (識別碼) 。 硬體識別碼是使用Models區段中的hw-id專案來指定,而且可以是 ACPI 命名空間或其他裝置命名空間中的硬體識別碼。 廠商也可以指定具有PNP0C33值的相容識別碼。 此相容識別碼是用來定義與 Microsoft 相容的硬體錯誤裝置。 廠商會使用Models區段中的compatible-id專案來指定相容的識別碼。

PSHED 外掛程式的 INF 檔案也必須包含AddReg指示詞,該指示詞會參考檔案中的區段,該區段會將專案新增至登錄中的System\CurrentControlSet\控制項\PSHED\外掛程式機碼。 此專案會通知 PSHED,PSHED 外掛程式已安裝在系統中。 這可讓 PSHED 確認每次系統啟動時,都會成功載入所有已安裝的 PSHED 外掛程式。

例如:

;
; Example PSHED plug-in INF file
;

[Version]
Signature = "$Windows NT$"
Class = System ; Specify appropriate Class
ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318} ; Specify appropriate ClassGuid
Provider = %Msft%
CatalogFile = "ExamplePSHEDPlugin.cat"
DriverVer = 01/01/06,1.0
PnpLockdown = 1

[SourceDiskNames]
1 = %DiskName%

[SourceDiskFiles]
%FileName% = 1

[DestinationDirs]
ExamplePSHEDPlugin.DriverFiles = 13

[Manufacturer]
%Msft% = Microsoft,NTamd64

[Microsoft.NTamd64]
%DeviceDesc% = ExamplePSHEDPluginInstall,%DeviceId%

[ExamplePSHEDPluginInstall]
OptionDesc = %Description%
CopyFiles = ExamplePSHEDPlugin.DriverFiles
AddReg = ExamaplePSHEDPlugin.AddReg

[ExamplePSHEDPluginInstall.Services]
AddService = %ServiceName%,,ExamplePSHEDPlugin.Service

[ExamplePSHEDPlugin.DriverFiles]
%FileName%,,,0x00000040 ; COPYFLG_OVERWRITE_OLDER_ONLY

[ExamplePSHEDPlugin.AddReg]
HKLM,%PSHEDControlPath%,%ServiceName%,0x00000000,%FileName%

[ExamplePSHEDPlugin.Service]
DisplayName = %ServiceName%
Description = %ServiceDesc%
ServiceType = 1  ; SERVICE_KERNEL_DRIVER
StartType = 3    ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %13%\%FileName%

[Strings]
%Msft% = "Microsoft Corporation"
%DiskName% = "Example PSHED Plug-In Installation Disk"
%FileName% = "ExamplePSHEDPlugin.sys"
%DeviceDesc% = "Example PSHED Plug-In Device"
%DeviceId% = "ACPI\PSHEDPI"
%Description% = "Example PSHED Plug-In"
%ServiceName% = "ExamplePSHEDPlugin"
%ServiceDesc% = "Example PSHED Plug-In"
%PSHEDControlPath% = "System\CurrentControlSet\Control\PSHED\Plugins"