0

我有一个简单的用户模式 ​​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"
4

1 回答 1

1

只要 .inf 文件适用于 Windows Vista/7 等,我认为它没问题!不幸的是,在 Windows 8 上,如果您想像在 Windows Vista/7 上一样使用接口 GUID 访问设备,您需要签署用户端驱动程序 (winusb) 的 .inf 文件。

你有三个选择:

  1. 签字。此链接将非常有帮助:http ://www.davidegrayson.com/signing/
  2. 禁用驱动程序签名强制,然后安装驱动程序。您只需要遵循此过程才能安装驱动程序。然后,您可以正常重新启动计算机并且驱动程序将正常工作,因为您没有安装任何内核端代码 - 否则您会遇到问题 - http://www.howtogeek.com/167723/how-to-disable -driver-signature-verification-on-64-bit-windows-8.1-so-that-you-can-install-unsigned-drivers/
  3. 如果设备仅供个人(开发)使用,您可以使用不带 .inf 的安装http://msdn.microsoft.com/en-us/library/windows/hardware/ff540283(v=vs.85).aspx

干杯,

克里斯托斯

于 2013-10-10T11:32:54.693 回答