我有一个简单的用户模式 USB 驱动程序,可以在 Windows XP 32 位、Windows 7 32 和 64 位以及 Windows 8 32 位中正常安装和工作。但由于某种原因无法在 Windows 8 64 位中正确安装。我使用的 inf 文件如下所示:
我收到类似“安装驱动程序包时遇到错误”的错误
;-------------------------------------------------------------------------
; USB.INF
;
; winusb device driver
;
;-------------------------------------------------------------------------
[Version]
Signature = "$Windows NT$"
Class = Products
ClassGuid = {78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider = %ProviderName%
DriverVer = 25/07/2011,1.0.1
;DriverPackageType=PlugAndPlay
DriverPackageDisplayName=%DESC%
;CatalogFile=MyCatFile.cat
; ================== Class section ===================
[ClassInstall32]
AddReg = ClassInstall_AddReg
[ClassInstall_AddReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1
; ========== Manufacturer/Models sections ===========
[Manufacturer]
%ProviderName% = Products,NTx86,NTx64
[Products.NTx86]
%USB\MyDevice.DeviceDesc% = USB_Install, USB\VID_21A2&PID_0100
[Products.NTx64]
%USB\MyDevice.DeviceDesc% = USB_Install, USB\VID_21A2&PID_0100
; =================== Installation ===================
[USB_Install]
Include = winusb.inf
Needs = WINUSB.NT
[USB_Install.Services]
Include = winusb.inf
AddService = WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService = WINUSB, WinUsb_Install
[WinUSB_Install]
KmdfLibraryVersion = 1.11
[USB_Install.HW]
AddReg = Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{70cd8e5b-1a46-4418-a1a5-4489f4b4aa79}"
[USB_Install.CoInstallers]
AddReg = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01011.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01011.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
; ================= Source Media Section =====================
[SourceDisksNames]
1 = %DISK_NAME%,,,\x86
2 = %DISK_NAME%,,,\x64
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01011.dll=1
[SourceDisksFiles.x64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01011.dll=2
; =================== Strings ===================
[Strings]
ProviderName = "Products"
ClassName = "Ss"
USB\MyDevice.DeviceDesc = "Ppp"
WinUSB_SvcDesc = "WinUSB Driver Service"
;DISK_NAME = "USBDriverPackage"
DESC = "Ppp"