为WinUSB驱动程序包安装编写自定义INF,目标是Windows 8 64位操作系统

时间:2013-04-26 13:25:38

标签: wix winusb

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

1 个答案:

答案 0 :(得分: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的安装
  4. 干杯,

    的Christos