从debugging中启动的INF安装文件系统minifilter

我正在处理我的第一个文件系统迷你filter。 我正在使用WDK中的SwapBuffers示例项目。 我已经成功地将这个项目编译和部署到物理笔记本电脑的虚拟机。 但从INF文件安装失败。 我查看目标机器上的C:\ DriverTest \ Logs日志文件,并在日志文件中find这些行。

UserText="WDTF_TARGETS: Query("HardwareIDs='WDTF\NOEXIST'")" UserText="WDTF_DRIVER_SETUP_SYSTEM: CreateRootEnumeratedDevicesFromPackage()" UserText="WDTF_DRIVER_SETUP_SYSTEM: UserText="WDTF_TEST: System has no device the driver package can be installed onto." 

这是INF文件。 从原始样本中未修改。

 ;;; SwapBuffers ;;; Copyright (c) 2001, Microsoft Corporation [Version] signature = "$Windows NT$" Class = "Encryption" ;This is determined by the work this filter driver does ClassGuid = {a0a701c0-a511-42ff-aa6c-06dc0395576f} ;This value is determined by the Class Provider = %Msft% DriverVer = 06/16/2007,1.0.0.3 CatalogFile = swapbuffers.cat [DestinationDirs] DefaultDestDir = 12 MiniFilter.DriverFiles = 12 ;%windir%\system32\drivers ;; Default install sections [DefaultInstall] OptionDesc = %ServiceDescription% CopyFiles = MiniFilter.DriverFiles [DefaultInstall.Services] AddService = %ServiceName%,,MiniFilter.Service ;; Default uninstall sections [DefaultUninstall] DelFiles = MiniFilter.DriverFiles [DefaultUninstall.Services] DelService = SwapBuffers,0x200 ;Ensure service is stopped before deleting ; Services Section [MiniFilter.Service] DisplayName = %ServiceName% Description = %ServiceDescription% ServiceBinary = %12%\%DriverName%.sys ;%windir%\system32\drivers\ Dependencies = "FltMgr" ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER ;StartType = 0 ;SERVICE_BOOT_START StartType = 3 ;SERVICE_DEMAND_START ErrorControl = 1 ;SERVICE_ERROR_NORMAL LoadOrderGroup = "FSFilter Encryption" AddReg = MiniFilter.AddRegistry ; Registry Modifications [MiniFilter.AddRegistry] HKR,,"SupportedFeatures",0x00010001,0x3 HKR,"Instances","DefaultInstance",0x00000000,%Instance1.Name% HKR,"Instances\"%Instance1.Name%,"Altitude",0x00000000,%Instance1.Altitude% HKR,"Instances\"%Instance1.Name%,"Flags",0x00010001,%Instance1.Flags% ; Copy Files [MiniFilter.DriverFiles] %DriverName%.sys [SourceDisksFiles] swapbuffers.sys = 1,, [SourceDisksNames] 1 = %DiskId1%,,, ;; String Section [Strings] Msft = "Microsoft Corporation" ServiceDescription = "Swap Buffers Sample Mini-Filter Driver" ServiceName = "SwapBuffers" DriverName = "SwapBuffers" DiskId1 = "SwapBuffers Device Installation Disk" ;Instances specific information. Instance1.Name = "SwapBuffers Instance" Instance1.Altitude = "141000" Instance1.Flags = 0x0 ; allow automatic attachments 

VMware会话有一个单独的硬盘,显示为DEVCON的SCSI驱动器。

谁能告诉我我在这里失踪了什么?

Solutions Collecting From Web of "从debugging中启动的INF安装文件系统minifilter"

如果您的驱动程序不是一个硬件,请转到

  1. 选择“驱动程序包”
  2. 打开“配置”
  3. 去“驱动程序安装” – >“部署”
  4. 选择“不要安装”

如果需要使用自定义命令,例如运行“svcctrl.exe”所需的参数。

在这些常见情况下,inf安装可能会失败:

  • 司机没有签字。
  • 该驱动程序是一个用测试证书签名的调试驱动程序,但是证书未安装在目标机器上。 在您的输出目录(cer文件)下生成测试证书。 将其复制到目标机器并双击它。
  • 目标机器需要启用测试签名:
    • 打开管理控制台
    • bcdedit -set TESTSIGNING ON
    • 重启

我发现安装批处理文件比较容易(不要忽略“./”):RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 ./MY_DRIVER_NAME.inf