I'm trying to create a "generic" Windows USB driver (really just an .inf-file) that could be used for several products under the same manufacturers. What I would like to do is to only list the Vendor IDs (VID) for the different manufactures so that I can use the same driver for different models from the same manufacturers, something like this:
[Version]
Signature=$WINDOWS NT$
Class=visaUsbDevice
ClassGUID={A3330EDF-239D-4206-833B-1D58952613D5}
Provider=%Vendor%
DriverVer=05/03/2017,1.0
CatalogFile=test.cat
;===========================================================================
; Default Installer
;===========================================================================
[DefaultInstall]
CopyINF=test.inf
[DestinationDirs]
[SourceDisksNames]
[SourceDisksFiles]
;===========================================================================
; Class Installer
;===========================================================================
[ClassInstall32]
AddReg=AddClass_AddReg
[AddClass_AddReg]
HKR,,,0,%DeviceClassString%
HKR,,Icon,,"-20"
;===========================================================================
[Manufacturer]
%Vendor%=USBList,NTamd64
[USBList]
%USB\VID_12D1.DeviceDesc%=WinUsb_Inst, USB\VID_12D1
%USB\VID_1004.DeviceDesc%=WinUsb_Inst, USB\VID_1004
%USB\VID_18D1.DeviceDesc%=WinUsb_Inst, USB\VID_18D1
%USB\VID_0BB4.DeviceDesc%=WinUsb_Inst, USB\VID_0BB4
%USB\VID_04E8.DeviceDesc%=WinUsb_Inst, USB\VID_04E8
%USB\VID_22B8.DeviceDesc%=WinUsb_Inst, USB\VID_22B8
%USB\VID_054C.DeviceDesc%=WinUsb_Inst, USB\VID_054C
%USB\VID_2A70.DeviceDesc%=WinUsb_Inst, USB\VID_2A70
[USBList.NTamd64]
%USB\VID_12D1.DeviceDesc%=WinUsb_Inst, USB\VID_12D1
%USB\VID_1004.DeviceDesc%=WinUsb_Inst, USB\VID_1004
%USB\VID_18D1.DeviceDesc%=WinUsb_Inst, USB\VID_18D1
%USB\VID_0BB4.DeviceDesc%=WinUsb_Inst, USB\VID_0BB4
%USB\VID_04E8.DeviceDesc%=WinUsb_Inst, USB\VID_04E8
%USB\VID_22B8.DeviceDesc%=WinUsb_Inst, USB\VID_22B8
%USB\VID_054C.DeviceDesc%=WinUsb_Inst, USB\VID_054C
%USB\VID_2A70.DeviceDesc%=WinUsb_Inst, USB\VID_2A70
[PreCopySection]
HKR,,NoSetupUI,,1
[WinUsb_Inst]
Include = winusb.inf
Needs = WINUSB.NT
[WinUsb_Inst.hw]
AddReg=WinUsb_Inst_HW_AddReg
[WinUsb_Inst.Services]
Addservice = WinUsb, 0x00000002, WinUsb_AddService
[WinUsb_AddService]
DisplayName = %WinUsb_Service_DisplayName%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\WinUSB.sys
[WinUsb_Inst_HW_AddReg]
HKR,,DeviceInterfaceGUIDs, 0x10000,"{761ED34A-CCFA-416b-94BB-33486DB1F5D5}"
[Strings]
Vendor="TEST"
USB\VID_12D1.DeviceDesc="HUAWEI"
USB\VID_1004.DeviceDesc="LGE"
USB\VID_18D1.DeviceDesc="GOOGLE"
USB\VID_0BB4.DeviceDesc="HTC"
USB\VID_04E8.DeviceDesc="SAMSUNG"
USB\VID_22B8.DeviceDesc="MOTOROLA"
USB\VID_054C.DeviceDesc="SONY"
USB\VID_2A70.DeviceDesc="ONEPLUS"
DeviceClassString="NI-VISA USB Devices"
WinUsb_Service_DisplayName="WinUSB Driver"
SERVICE_BOOT_START = 0x0
SERVICE_SYSTEM_START = 0x1
SERVICE_AUTO_START = 0x2
SERVICE_DEMAND_START = 0x3
SERVICE_DISABLED = 0x4
SERVICE_KERNEL_DRIVER = 0x1
SERVICE_ERROR_IGNORE = 0x0
SERVICE_ERROR_NORMAL = 0x1
SERVICE_ERROR_SEVERE = 0x2
SERVICE_ERROR_CRITICAL = 0x3
But I can't seem to get it to work without having a product ID (PID) connected to the listed VIDs, e.g:
%USB\VID_1004&PID_631C.DeviceDesc%=WinUsb_Inst, USB\VID_1004&PID_631C
When I try to manually select the inf file I created for my devices in Device Manager, it gives me the following error:
The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems.
But if I use the .inf file where i have specified some of my devices PIDs, it works. The problem is that I can't list all the different PIDs because the driver needs to be compatible with a random device from the listed manufacturers. Anyone who knows how I can get around this?