I have the same question.
pnputil - failed to pnp(plag and play) install the driver at using winusb via libusb driver inf
Hi All,
I'm trying to support plug and play for my USB driver used winusb via libusb.
My USB driver inf file could got a catalog file and a microsoft signature from the Microsoft Partner Center.
But the running pnputil with this inf file will result in an error .
Processing inf : libusb_devce.inf
Adding the driver package failed : The system cannot find the specified.
Also, when I checked "C:\Windows\ inf\setupapi.dev", this error was "Failed to find driver package after import. Error = 0x00000002".
I probably think that my inf file wrote inclde winusb.inf in[Service] section.
winusb.inf file was not provided at the time of signing.
Therefore, I think that the catalog file does not contain winusb.inf and this file does not found it on pnputil command.
How can my usb driver make plag and play available on Windows 10?
Thanks in advance.....
;My libusb.inf
[Strings]
DeviceName = "MyTestDevice"
VendorID = "VID_1000" ; == dummy vid
ProductID = "PID_0001" ; == dummy pid
DeviceGUID = "{148F47B0-690F-4C98-B5E4-298F38DED1F5}"
DeviceClassGUID = "{88BAE032-5A81-49f0-BC3D-A4FF138216D6}"
ProviderName = "libusb 1.0"
WinUSB_SvcDesc = "WinUSB Driver Service"
DiskName = "libusb (WinUSB) Device Install Disk"
ClassName = "USBDevice"
[Version]
DriverVer = %Date%
Signature = "$Windows NT$"
Class = %ClassName%
ClassGuid = %DeviceClassGUID%
Provider = %ProviderName%
CatalogFile = libusb_device.cat
[Manufacturer]
%ProviderName% = libusbDevice_WinUSB,NTx86,NTamd64
[libusbDevice_WinUSB.NTx86]
%DeviceName% = USB_Install, USB\%VendorID%&%ProductID%
[libusbDevice_WinUSB.NTamd64]
%DeviceName% = USB_Install, USB\%VendorID%&%ProductID%
; ==================== 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.9
; ===============================================
[USB_Install.HW]
AddReg=Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,%DeviceGUID%
[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
[SourceDisksNames]
1 = %DiskName%,,,\x86
2 = %DiskName%,,,\amd64
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01009.dll=1
[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01009.dll=2
<setupapi.dev>
>>> [Driver Install (DrvSetupInstallDriver) - c:\Windows\INF\libusb_device.inf]
>>> Section start 2021/08/20 18:42:07.782
cmd: C:\Windows\system32\pnputil -i -a c:\Windows\INF\libusb_device.inf
dvs: Flags: 0x00000000
dvs: {Driver Setup Import Driver Package: c:\Windows\INF\libusb_device.inf} 18:42:07.784
sto: {Copy Driver Package: c:\Windows\INF\libusb_device.inf} 18:42:07.788
sto: Driver Package = c:\Windows\INF\libusb_device.inf
sto: Flags = 0x00000007
sto: Destination = C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}
sto: Copying driver package files to 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}'.
flq: {FILE_QUEUE_COMMIT} 18:42:07.795
flq: Copying 'c:\Windows\INF\amd64\WdfCoInstaller01009.dll' to 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\amd64\WdfCoInstaller01009.dll'.
flq: Copying 'c:\Windows\INF\amd64\WinUSBCoInstaller2.dll' to 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\amd64\WinUSBCoInstaller2.dll'.
flq: Copying 'c:\Windows\INF\libusb_device.cat' to 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\libusb_device.cat'.
flq: Copying 'c:\Windows\INF\libusb_device.inf' to 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\libusb_device.inf'.
flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 18:42:07.903
sto: {Copy Driver Package: exit(0x00000000)} 18:42:07.912
ump: Import flags: 0x00000000
pol: {Driver package policy check} 18:42:07.948
pol: {Driver package policy check - exit(0x00000000)} 18:42:07.950
sto: {Stage Driver Package: C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\libusb_device.inf} 18:42:07.953
inf: {Query Configurability: C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\libusb_device.inf} 18:42:07.970
inf: Driver package uses WDF.
inf: Driver package 'libusb_device.inf' is configurable.
inf: {Query Configurability: exit(0x00000000)} 18:42:07.982
flq: {FILE_QUEUE_COMMIT} 18:42:07.986
flq: Copying 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\amd64\WdfCoInstaller01009.dll' to 'C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}\amd64\WdfCoInstaller01009.dll'.
flq: Copying 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\amd64\WinUSBCoInstaller2.dll' to 'C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}\amd64\WinUSBCoInstaller2.dll'.
flq: Copying 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\libusb_device.cat' to 'C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}\libusb_device.cat'.
flq: Copying 'C:\Users\tomey\AppData\Local\Temp\{9bb02328-fcbe-8141-89e0-6fee030690c9}\libusb_device.inf' to 'C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}\libusb_device.inf'.
flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 18:42:08.046
sto: {DRIVERSTORE IMPORT VALIDATE} 18:42:08.049
sig: Driver package catalog is valid.
sig: {_VERIFY_FILE_SIGNATURE} 18:42:08.118
sig: Key = libusb_device.inf
sig: FilePath = C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}\libusb_device.inf
sig: Catalog = C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}\libusb_device.cat
sig: Success: File is signed in catalog.
sig: {_VERIFY_FILE_SIGNATURE exit(0x00000000)} 18:42:08.150
sto: {DRIVERSTORE IMPORT VALIDATE: exit(0x00000000)} 18:42:08.228
sig: Signer Score = 0x0D000005 (WHQL)
sig: Signer Name = Microsoft Windows Hardware Compatibility Publisher
sig: Submission ID = 30784020_14287225684539697_1152921505693801356
sto: {Core Driver Package Import: libusb_device.inf_amd64_32417c1d5ac7cc59} 18:42:08.234
sto: {DRIVERSTORE IMPORT BEGIN} 18:42:08.235
sto: {DRIVERSTORE IMPORT BEGIN: exit(0x00000000)} 18:42:08.236
cpy: {Copy Directory: C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}} 18:42:08.237
cpy: Target Path = C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59
cpy: {Copy Directory: C:\Windows\System32\DriverStore\Temp\{ab0c73be-d942-1642-8198-6b1a1a2842d3}\amd64} 18:42:08.239
cpy: Target Path = C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\amd64
cpy: {Copy Directory: exit(0x00000000)} 18:42:08.243
cpy: {Copy Directory: exit(0x00000000)} 18:42:08.245
idb: {Register Driver Package: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\libusb_device.inf} 18:42:08.247
idb: Created driver package object 'libusb_device.inf_amd64_32417c1d5ac7cc59' in SYSTEM database node.
idb: Created driver INF file object 'oem2.inf' in SYSTEM database node.
idb: Registered driver package 'libusb_device.inf_amd64_32417c1d5ac7cc59' with 'oem2.inf'.
idb: {Register Driver Package: exit(0x00000000)} 18:42:08.251
idb: {Publish Driver Package: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\libusb_device.inf} 18:42:08.252
idb: Activating driver package 'libusb_device.inf_amd64_32417c1d5ac7cc59'.
cpy: Published 'libusb_device.inf_amd64_32417c1d5ac7cc59\libusb_device.inf' to 'oem2.inf'.
idb: Indexed 2 device IDs for 'libusb_device.inf_amd64_32417c1d5ac7cc59'.
sto: Flushed driver database node 'SYSTEM'. Time = 15 ms
idb: {Publish Driver Package: exit(0x00000000)} 18:42:08.273
sto: {DRIVERSTORE IMPORT END} 18:42:08.276
dvi: Flushed all driver package files to disk. Time = 0 ms
sig: Installed catalog 'libusb_device.cat' as 'oem2.cat'.
sto:
{DRIVERSTORE IMPORT END: exit(0x00000000)} 18:42:08.297
sto: {Core Driver Package Import: exit(0x00000000)} 18:42:08.298
sto: {Stage Driver Package: exit(0x00000000)} 18:42:08.301
!!! dvs: Failed to find driver package after import. Error = 0x00000002
dvs: {Driver Setup Import Driver Package - exit (0x00000002)} 18:42:08.349
sto: {Delete Driver Package: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\libusb_device.inf} 18:42:08.349
sto: Driver Package = libusb_device.inf_amd64_32417c1d5ac7cc59
sto: Flags = 0x00000000
ump: Delete flags: 0x00000000
pol: {Driver package policy check} 18:42:08.359
pol: {Driver package policy check - exit(0x00000000)} 18:42:08.360
sto: {Unstage Driver Package: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\libusb_device.inf} 18:42:08.361
sto: {Core Driver Package Delete: libusb_device.inf_amd64_32417c1d5ac7cc59} 18:42:08.362
sto: {DRIVERSTORE DELETE BEGIN} 18:42:08.363
sto: {DRIVERSTORE DELETE BEGIN: exit(0x00000000)} 18:42:08.365
idb: {Unpublish Driver Package: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\libusb_device.inf} 18:42:08.367
idb: Clearing active driver package 'libusb_device.inf_amd64_32417c1d5ac7cc59'.
cpy: Unpublished 'oem2.inf'.
idb: Deindexed 2 device IDs for 'libusb_device.inf_amd64_32417c1d5ac7cc59'.
sto: Flushed driver database node 'SYSTEM'. Time = 0 ms
idb: {Unpublish Driver Package: exit(0x00000000)} 18:42:08.375
idb: {Unregister Driver Package: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\libusb_device.inf} 18:42:08.377
idb: Unregistered driver package 'libusb_device.inf_amd64_32417c1d5ac7cc59' from 'oem2.inf'.
idb: Deleted driver package object 'libusb_device.inf_amd64_32417c1d5ac7cc59' from SYSTEM database node.
idb: Deleted driver INF file object 'oem2.inf' from SYSTEM database node.
idb: {Unregister Driver Package: exit(0x00000000)} 18:42:08.381
cpy: {Delete Directory: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59} 18:42:08.382
cpy: {Delete Directory: C:\Windows\System32\DriverStore\FileRepository\libusb_device.inf_amd64_32417c1d5ac7cc59\amd64} 18:42:08.383
cpy: {Delete Directory: exit(0x00000000)} 18:42:08.384
cpy: {Delete Directory: exit(0x00000000)} 18:42:08.385
sto: {DRIVERSTORE DELETE END} 18:42:08.386
sig: Uninstalled catalog 'oem2.cat'.
sto: {DRIVERSTORE DELETE END: exit(0x00000000)} 18:42:08.396
sto: {Core Driver Package Delete: exit(0x00000000)} 18:42:08.398
sto: {Unstage Driver Package: exit(0x00000000)} 18:42:08.399
sto: {Delete Driver Package: exit(0x00000000)} 18:42:08.405
!!! dvs: Failed to import driver packages under 'c:\Windows\INF\libusb_device.inf'. Error = 0x00000002
<<< Section end 2021/08/20 18:42:08.408
<<< [Exit status: FAILURE(0x00000002)]