WinUSB 驱动程序安装在 XP 上失败(在 Win7 上工作正常)

发布于 2024-12-12 15:39:09 字数 6330 浏览 3 评论 0原文

我在 Windows XP(x86,service pack 3)上安装 WinUSB 驱动程序时遇到困难。我遵循 Microsoft WinUSB 指南,使用 inf 文件、签名 cat 文件(使用 Inf2cat 创建)和相关 WinUSB 辅助安装程序创建签名驱动程序包。在 Windows7 上一切正常,但在 XP 上安装失败。

inf 文件如下:

[Version]
Signature = "$Windows NT$"
Class = "Digitool Processors"
ClassGuid={D851949D-3793-4FA6-93F5-E86CCDCFD6F9}
Provider = %ProviderName%
CatalogFile=DigitoolCatFile.cat
DriverVer=10/28/2010,1.0.0.0

; ================== Class section ==================

[ClassInstall32]
Addreg=MyDeviceClassReg

[MyDeviceClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1

; ========== Manufacturer/Models sections ===========

[Manufacturer]
%ProviderName% = Digitool_WinUSB,NTx86,NTamd64,NTia64

[Digitool_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_064B&PID_1212

[Digitool_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_064B&PID_1212

[Digitool_WinUSB.NTia64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_064B&PID_1212
; =================== Installation ===================

[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT

;[2]
[USB_Install.Services]
Include=winusb.inf
Needs=WINUSB.NT.Services

;[3]
[USB_Install.Wdf]
KmdfService=WINUSB, WinUSB_Install

[WinUSB_Install]
KmdfLibraryVersion=1.9

;[4]
[USB_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{40F2F474-A52F-4DDD-815F-785DFA5A5550}"

;[5]
[USB_Install.CoInstallers]   
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"

[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

; ================= Source Media Section =====================
;[7]

[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
3 = %DISK_NAME%,,,\ia64

[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01009.dll=1

[SourceDisksFiles.NTamd64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01009.dll=2

[SourceDisksFiles.ia64]
WinUSBCoInstaller2.dll=3
WdfCoInstaller01009.dll=3
; =================== Strings ===================

[Strings]
ProviderName="Peavey Electronics"
USB\MyDevice.DeviceDesc="Digitool USB"
WinUSB_SvcDesc="Digitool USB"
DISK_NAME="Install Disk"
ClassName="Digitool Processors"

XP 中的 setupapi 登录失败看起来像这样:

[SetupAPI Log]
OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0100
Product Type = 1
Architecture = x86
[2011/10/28 18:33:56 5900.645]
#-198 Command line processed: "C:\WINDOWS\system32\mmc.exe" C:\WINDOWS\system32    \devmgmt.msc /s 
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_064b&pid_1212&rev_0100,us \vid_064b&pid_1212
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,us \class_ff&subclass_00,usb\class_ff
#I022 Found "USB\VID_064B&PID_1212" in C:\WINDOWS\inf\oem34.inf; Device: "Digitool USB"; Driver: "Digitool USB"; Provider: "Peavey Electronics"; Mfg: "Peavey Electronics"; Section name: "USB_Install".
#I087 Driver node not trusted, rank changed from 0x00000001 to 0x00008001.
#I023 Actual install section: [USB_Install]. Rank: 0x00008001. Effective driver date: 10/28/2010.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [USB_Install] in "c:\windows\inf\oem34.inf".
#I320 Class GUID of device remains: {D851949D-3793-4FA6-93F5-E86CCDCFD6F9}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of "USB\VID_064B&PID_1212\5&26DFC3A5&0&2".
#W334 Failed to verify catalog when scanning file queue. Error 1168: Element not found.
#E360 An unsigned or incorrectly signed file "c:\windows\inf\oem34.inf" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#W187 Install failed, attempting to restore original files.
#E360 An unsigned or incorrectly signed file "c:\windows\inf\oem34.inf" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#-024 Copying file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WinUSBCoInstaller2.dll" to "C:\WINDOWS\system32\WinUSBCoInstaller2.dll".
#E360 An unsigned or incorrectly signed file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WinUSBCoInstaller2.dll" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#-336 Copying file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WdfCoInstaller01009.dll" to "C:\WINDOWS\system32\WdfCoInstaller01009.dll" via temporary file "C:\WINDOWS\system32\SET15.tmp".
#E360 An unsigned or incorrectly signed file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WdfCoInstaller01009.dll" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [USB_Install.Interfaces] from "c:\windows\inf\oem34.inf".
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of "USB\VID_064B&PID_1212\5&26DFC3A5&0&2".
#E275 Error while installing services. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E157 Default installer failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#W422 Coinstaller 1 (Post Processing) modified status. Error 87: The parameter is incorrect.
#I060 Set selected driver.
#I125 Installing NULL driver for "USB\VID_064B&PID_1212\5&26DFC3A5&0&2".
#I121 Device install of "USB\VID_064B&PID_1212\5&26DFC3A5&0&2" finished successfully.

我正在绞尽脑汁地试图找出 XP 上出了什么问题。错误

“扫描文件队列时无法验证目录”和“未签名或签名错误的文件”

对我来说毫无意义,因为驱动程序包已正确签名,并且可以在 Win7 上正确安装且没有任何警告。非常欢迎任何帮助

谢谢 汤姆

I'm having difficulty installing a WinUSB driver on Windows XP (x86, service pack 3). I've followed the Microsoft WinUSB guidelines to create a signed driver package using an inf file, signed cat file (made using Inf2cat), and relevant WinUSB coinstallers. Everything works perfectly on Windows7, but installation fails on XP.

The inf file is as follows:

[Version]
Signature = "$Windows NT$"
Class = "Digitool Processors"
ClassGuid={D851949D-3793-4FA6-93F5-E86CCDCFD6F9}
Provider = %ProviderName%
CatalogFile=DigitoolCatFile.cat
DriverVer=10/28/2010,1.0.0.0

; ================== Class section ==================

[ClassInstall32]
Addreg=MyDeviceClassReg

[MyDeviceClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1

; ========== Manufacturer/Models sections ===========

[Manufacturer]
%ProviderName% = Digitool_WinUSB,NTx86,NTamd64,NTia64

[Digitool_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_064B&PID_1212

[Digitool_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_064B&PID_1212

[Digitool_WinUSB.NTia64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_064B&PID_1212
; =================== Installation ===================

[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT

;[2]
[USB_Install.Services]
Include=winusb.inf
Needs=WINUSB.NT.Services

;[3]
[USB_Install.Wdf]
KmdfService=WINUSB, WinUSB_Install

[WinUSB_Install]
KmdfLibraryVersion=1.9

;[4]
[USB_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{40F2F474-A52F-4DDD-815F-785DFA5A5550}"

;[5]
[USB_Install.CoInstallers]   
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"

[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

; ================= Source Media Section =====================
;[7]

[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
3 = %DISK_NAME%,,,\ia64

[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01009.dll=1

[SourceDisksFiles.NTamd64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01009.dll=2

[SourceDisksFiles.ia64]
WinUSBCoInstaller2.dll=3
WdfCoInstaller01009.dll=3
; =================== Strings ===================

[Strings]
ProviderName="Peavey Electronics"
USB\MyDevice.DeviceDesc="Digitool USB"
WinUSB_SvcDesc="Digitool USB"
DISK_NAME="Install Disk"
ClassName="Digitool Processors"

The setupapi log on failure in XP looks like this:

[SetupAPI Log]
OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0100
Product Type = 1
Architecture = x86
[2011/10/28 18:33:56 5900.645]
#-198 Command line processed: "C:\WINDOWS\system32\mmc.exe" C:\WINDOWS\system32    \devmgmt.msc /s 
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_064b&pid_1212&rev_0100,us \vid_064b&pid_1212
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,us \class_ff&subclass_00,usb\class_ff
#I022 Found "USB\VID_064B&PID_1212" in C:\WINDOWS\inf\oem34.inf; Device: "Digitool USB"; Driver: "Digitool USB"; Provider: "Peavey Electronics"; Mfg: "Peavey Electronics"; Section name: "USB_Install".
#I087 Driver node not trusted, rank changed from 0x00000001 to 0x00008001.
#I023 Actual install section: [USB_Install]. Rank: 0x00008001. Effective driver date: 10/28/2010.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [USB_Install] in "c:\windows\inf\oem34.inf".
#I320 Class GUID of device remains: {D851949D-3793-4FA6-93F5-E86CCDCFD6F9}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of "USB\VID_064B&PID_1212\5&26DFC3A5&0&2".
#W334 Failed to verify catalog when scanning file queue. Error 1168: Element not found.
#E360 An unsigned or incorrectly signed file "c:\windows\inf\oem34.inf" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#W187 Install failed, attempting to restore original files.
#E360 An unsigned or incorrectly signed file "c:\windows\inf\oem34.inf" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#-024 Copying file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WinUSBCoInstaller2.dll" to "C:\WINDOWS\system32\WinUSBCoInstaller2.dll".
#E360 An unsigned or incorrectly signed file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WinUSBCoInstaller2.dll" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#-336 Copying file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WdfCoInstaller01009.dll" to "C:\WINDOWS\system32\WdfCoInstaller01009.dll" via temporary file "C:\WINDOWS\system32\SET15.tmp".
#E360 An unsigned or incorrectly signed file "C:\WINDOWS\system32\DRVSTORE\digitool_AB7D48D412FA027D36DB13E9FD73698685B0025A\i386\WdfCoInstaller01009.dll" for driver "Digitool USB" will be installed (Policy=Ignore). Error 1168: Element not found.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [USB_Install.Interfaces] from "c:\windows\inf\oem34.inf".
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of "USB\VID_064B&PID_1212\5&26DFC3A5&0&2".
#E275 Error while installing services. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E157 Default installer failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#W422 Coinstaller 1 (Post Processing) modified status. Error 87: The parameter is incorrect.
#I060 Set selected driver.
#I125 Installing NULL driver for "USB\VID_064B&PID_1212\5&26DFC3A5&0&2".
#I121 Device install of "USB\VID_064B&PID_1212\5&26DFC3A5&0&2" finished successfully.

I'm tearing my hair out trying to figure out what's going wrong on XP. The errors

"Failed to verify catalog when scanning file queue" and "An unsigned or incorrectly signed file"

make no sense to me, as the driver package is correctly signed, and installs correctly on Win7 with no warnings. Any help would be extremely welcome

Thanks
Tom

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

能怎样 2024-12-19 15:39:09

我认为的一个问题是 [SourceDisksFiles.NTamd64] 应该是 [SourceDisksFiles.amd64]。我不确定这就是问题所在,但这是一个问题。

我认为真正的问题是 Windows XP 不支持这一行:
Needs=WINUSB.NT.Services

您需要将其更改为:

;[2]
[USB_Install.Services]
Include=winusb.inf
Needs=WinUSB,0x00000002,WinUSB_ServiceInstall

[WinUSB_ServiceInstall]
DisplayName = %DisplayName% ; set this in your string area
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys

One issue I believe is that [SourceDisksFiles.NTamd64] should be [SourceDisksFiles.amd64]. I'm not sure that is the issue, but thats one problem.

I think the real issue is that Windows XP does not support this line:
Needs=WINUSB.NT.Services

You need to change it to this:

;[2]
[USB_Install.Services]
Include=winusb.inf
Needs=WinUSB,0x00000002,WinUSB_ServiceInstall

[WinUSB_ServiceInstall]
DisplayName = %DisplayName% ; set this in your string area
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文