我正在开发我的第一个文件系统迷你过滤器。我正在使用WDK中的SwapBuffers示例项目。我已经成功地将这个项目编译并从物理笔记本电脑部署到VM。但是INF文件的安装失败了。我查看了目标计算机上C:\ DriverTest \ Logs中的日志文件,并在日志文件中找到了这些行。
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驱动器。
谁能告诉我这里缺少什么?
答案 0 :(得分:3)
如果您的驱动程序不适用于硬件,请转至
如果需要,请使用自定义命令,例如使用所需参数运行“svcctrl.exe”。
答案 1 :(得分:1)
inf安装可能会在这些常见情况下失败:
我发现从批处理文件安装更容易(不要省略“./”): RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 ./MY_DRIVER_NAME.inf