Windows 如何在系统引导时加载kmdf驱动程序(wfp/inspect)

Windows 如何在系统引导时加载kmdf驱动程序(wfp/inspect),windows,kmdf,Windows,Kmdf,我编写了简单的64位kmdf驱动程序(wfp/inspect)。该驱动程序位于: %WinDir%\System32\Drivers\Inspect.sys 我可以使用:net start inspect加载这个驱动程序 现在我想在Windows启动期间加载此驱动程序,因此我准备了此inf文件: [版本] Signature=“$Windows NT$” Class=wfpcalouts ClassGuid={57465043-616C-6C6F-7574-5F636C617373} 提供程序

我编写了简单的64位kmdf驱动程序(wfp/inspect)。该驱动程序位于:

%WinDir%\System32\Drivers\Inspect.sys

我可以使用:net start inspect加载这个驱动程序

现在我想在Windows启动期间加载此驱动程序,因此我准备了此inf文件:

[版本]
Signature=“$Windows NT$”
Class=wfpcalouts
ClassGuid={57465043-616C-6C6F-7574-5F636C617373}
提供程序=%ProviderString%
CatalogFile=Inspect.cat
Driver=2018年9月20日,19.58.54.237


[源磁盘名称]
1=%InspectDisk%,“,”


[源磁盘文件]
Inspect.sys=1,,


[目的地]
DefaultDestDir=12;%WinDir%\System32\Drivers
检查驱动文件=12;%WinDir%\System32\Drivers


[默认安装]
OptionDesc=%InspectServiceDesc%
CopyFiles=检查.DriverFiles


[DefaultInstall.Services]
AddService=%InspectServiceName%,Inspect.Service


[默认卸载]
DelFiles=Inspect.DriverFiles


[DefaultUninstall.Services]
DelService=%InspectServiceName%,0x200;SPSVCINST_停止服务
DelReg=Inspect.DelRegistry


[检查驱动文件]
检查系统,0x00000040;COPYFLG\u仅覆盖较旧的内容


[检查服务]
DisplayName=%InspectServiceName%
说明=%InspectServiceDesc%
服务类型=1;服务内核驱动程序
StartType=0;服务启动启动启动
误差控制=1;服务错误正常
ServiceBinary=%12%\Inspect.sys;%WinDir%\System32\Drivers\Inspect.sys
AddReg=Inspect.AddRegistry


[检查.添加注册表]
HKR,“参数”,“区块流量”,0x00010011,“0”;FLG_ADDREG_TYPE_DWORD
HKR,“参数”,“RemoteAddressToInspect”,0x00000000,“10.0.0.1”;FLG_ADDREG_TYPE_SZ


[检查注册表]
HKR,“参数”,,


[字符串] ProviderString=“TODO设置提供程序”
InspectDisk=“流量检查安装盘”
InspectServiceDesc=“交通检查调用驱动程序”
InspectServiceName=“Inspect”

但驱动程序并没有在启动时加载

正如我在开头提到的,它是64位kmdf驱动程序

我忘了什么吗?有什么建议/提示吗

谢谢您的帮助。

请参阅以下内容。TL;博士:

使用sc create[service name]binPath=[path to your.sys file]类型= kernel创建内核模式服务,sc start[service name]创建 开始吧