;/*++

;

;Copyright (c) 1990-1999 Microsoft Corporation All rights Reserved

;

;Module Name:

;

;    STATBUS.INF

;

;Abstract:

;    INF file for installing toaster bus enumerator driver

;

;Installation Notes:

;    Using Devcon: Type "devcon install statbus.inf root\statbus" to install

;

;--*/

 

;Version 节出现在inf中的第一个位置,每个inf文件都必须有。

[Version]

;指明那个系统上这个inf是有效的

Signature="$WINDOWS NT$"

 

;标准设备类的名字,在devguid.h中有定义,最好同时提供ClassGuid,方便系统查找。

如果定义新的设备类,那么必须使用新的名字,GUID.

Class=System

; 系统类的GUID

ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}

 

;指定inf文件的提供者

 

Provider=%MSFT%

;驱动版本信息

DriverVer=05/10/2011,6.1.7600.16385

指定驱动程序包含的在安装包中的catalog文件。这些 文件由WQHL提供。

CatalogFile=KmdfSamples.cat

 

;指定了驱动文件将被拷贝到哪里

01

SourceDrive:\pathname (the directory from which the INF file was installed)

10

Windows directory
This is equivalent to %windir%.

11

System directory
This is equivalent to %windir%\system32 for NT-based systems, and to %windir%\system for Windows 9x/Me.

12

Drivers directory
This is equivalent to %windir%\system32\drivers for NT-based platforms, and to %windir%\system\IoSubsys on Windows 9x/Me platforms.

17

INF file directory

18

Help directory

20

Fonts directory

21

Viewers directory

23

Color directory (ICM) (not used for installing printer drivers)

24

Root directory of the system disk.
This is the root directory of the disk on which Windows files are installed. For example, if dirid 10 is "C:\winnt", then dirid 24 is "C:\".

25

Shared directory

30

Root directory of the boot disk, also known as "ARC system partition," for NT-based systems. (This might or might not be the same directory as the one represented by dirid 24.)

50

System directory for NT-based operating systems

This is equivalent to %windir%\system (NT-based systems only).

51

Spool directory (not used for installing printer drivers − see Printer Dirids)

52

Spool drivers directory (not used for installing printer drivers)

53

User profile directory

54

Directory where ntldr.exe and osloader.exe are located (NT-based systems only)

55

Print processors directory (not used for installing printer drivers)

-1

Absolute path

 

[DestinationDirs]

DefaultDestDir = 12

 

;指定使用什么分发媒体。

[SourceDisksNames]

diskid = disk-description[,[tag-or-cab-file],[unused,path],[flags][,tag-file]] Windows XP and later

如果有多个地方,需要指定1234,。。。

1 = %DiskId1%,,,""

 

;指定文件在那个分发媒体上。

[SourceDisksFiles]

statbus.sys = 1,,

 

 

;*****************************************

; ToasterStatBus Install Section

;*****************************************

 

Manufacturer章节用于识别这样一些厂商,该厂商的一个或者多个设备能够使用该inf文件进行安装。

[Manufacturer]
manufacturer-identifier
[manufacturer-identifier]
[manufacturer-identifier]

 

manufacturer-identifier如下表示:

manufacturer-name |
%strkey%=models-section-name |
%strkey%=models-section-name [,TargetOSVersion] [,TargetOSVersion] ... (Windows XP and later versions of Windows)

 

 

该条目确定设备的厂商,并且在inf文件中必须有一个相应的同样的名字的Models章节。

 

 

 

[Manufacturer]

%StdMfg%=Standard,NTx86

; For Win2K because it cannot parse decorated sections.

[Standard]

;

; These are the toaster bus pnp ids

; ToasterStatBus.DeviceDesc是设备描述

ToasterStatBus_Deviceinstall-section-name

; root\statbus是硬件ID

硬件ID有以下一些格式。

enumerator\enumerator-specific-device-id

Is the typical format for individual PnP devices reported to the PnP manager by a single enumerator. For example, USB\VID_045E&PID_00B identifies the Microsoft HID keyboard device on a USB bus. Depending on the enumerator, such a specification can even include the device's hardware revision number as, for example, PCI\VEN_1011&DEV_002&SUBSYS_00000000&REV_02.

*enumerator-specific-device-id

Indicates with the asterisk (*) that the device is supported by more than one enumerator. For example, *PNP0F01 identifies the Microsoft serial mouse, which also has a compatible-id specification of SERENUM\PNP0F01.

device-class-specific-ID

Is an I/O bus-specific format, as described in the hardware specification for the bus, for the hardware IDs of all peripheral devices on that type of I/O bus.

 

%ToasterStatBus.DeviceDesc%=ToasterStatBus_Device, root\statbus

 

; For XP and later

[Standard.NTx86]

%ToasterStatBus.DeviceDesc%=ToasterStatBus_Device, root\statbus

 

[ToasterStatBus_Device.NT]

CopyFiles=Drivers_Dir

 

[ToasterStatBus_Device.NT.HW]

AddReg=ToasterStatBus_Device.NT.AddReg

 

[ToasterStatBus_Device.NT.AddReg]                           

HKR,,DeviceCharacteristics,0x10001,0x0100         ; Use same security checks on relative opens

HKR,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;SY)"      ; Allow generic-all access to Built-in administrators and Local system

 

[Drivers_Dir]

statbus.sys

 

 

;-------------- Service installation

[ToasterStatBus_Device.NT.Services]

AddService = statbus,%SPSVCINST_ASSOCSERVICE%, Statbus_Service_Inst

 

; -------------- statbus driver install sections

[Statbus_Service_Inst]

DisplayName    = %statbus.SVCDESC%

ServiceType    = 1              ; SERVICE_KERNEL_DRIVER

StartType      = 3               ; SERVICE_DEMAND_START

ErrorControl   = 1               ; SERVICE_ERROR_NORMAL

ServiceBinary = %12%\statbus.sys

LoadOrderGroup = Extended Base

 

 

;

;--- ToasterStatBus_Device WDF Coinstaller installation ------

;

[DestinationDirs]

ToasterStatBus_Device_CoInstaller_CopyFiles = 11

 

[ToasterStatBus_Device.NT.CoInstallers]

AddReg=ToasterStatBus_Device_CoInstaller_AddReg

CopyFiles=ToasterStatBus_Device_CoInstaller_CopyFiles

 

[ToasterStatBus_Device_CoInstaller_AddReg]

HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01009.dll,WdfCoInstaller"

 

[ToasterStatBus_Device_CoInstaller_CopyFiles]

WdfCoInstaller01009.dll

 

[SourceDisksFiles]

WdfCoInstaller01009.dll=1 ; make sure the number matches with SourceDisksNames

 

[ToasterStatBus_Device.NT.Wdf]

KmdfService = statbus, statbus_wdfsect

[statbus_wdfsect]

KmdfLibraryVersion = 1.9

 

 

 

[Strings]

SPSVCINST_ASSOCSERVICE= 0x00000002

MSFT = "Microsoft"

StdMfg = "(Standard system devices)"

DiskId1 = "Toaster Static Bus Installation Disk #1"

ToasterStatBus.DeviceDesc = "Toaster Static Bus Enumerator"

statbus.SVCDESC = "Toaster Static Bus Enumerator"