我有一个简单的用户模式usb驱动程序,它在Windows XP 32位,Windows 7 32和Windows中安装并正常运行。 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"
答案 0 :(得分:1)
只要.inf文件适用于Windows Vista / 7等,我认为它没问题!不幸的是,在Windows 8上,如果要使用Windows Vista / 7上的接口GUID访问设备,则需要签署用户端驱动程序(winusb)的.inf文件。
您有三种选择:
干杯,
的Christos