Re: [libwdi-devel] libwdi - installing driver on a specific device instance, when there are other w
Windows Driver Installer library for USB devices
Brought to you by:
pbatard
From: Pete B. <pb...@gm...> - 2012-07-11 22:18:23
|
Hi Arnon, On 2012.07.11 16:54, Arnon Gilboa wrote: > I have several instances of the same device (same vid:pid). > When I use wdi_prepare_driver() and wdi_install_driver() on a specific > device (found by its device_id), it installs the driver on all the > plugged instances with the same vid:pid. > I would like to install the driver only on the specified device_id. Any > way to do that? If you haven't got it already, can you please download and run the latest version of Zadig from https://sourceforge.net/projects/libwdi/files/zadig/, the go to the Options menu and check: "List All Devices", "Advanced Mode" as well as set "Log Verbosity" to "Debug" and then plug in at least two of your devices. If you see the Hardware ID reported for both devices as identical (and unless your devices have different revisions, since they have same VID:PID, they probably are), then it is unlikely that libwdi will be able to install a driver for only one device. The reason is we are using UpdateDriverForPlugAndPlayDevices() [1], which takes the Hardware ID as parameter, and, since there is no additional parameter we can use to differentiate devices with the same Hardware ID, which will install a driver for all devices that match. Unfortunately, I don't think there exists a method that lets Window only target a specific device for driver installation when hardware IDs are the same. Specifically, doing so would require using a device instance ID which, as far as I recall, is only generated once a driver a device has been installed => chicken and egg problem. You may also want to have a look at [2] for additional info. Regards, /Pete [1] http://msdn.microsoft.com/en-us/library/windows/hardware/ff553534%28v=vs.85%29.aspx [2] http://msdn.microsoft.com/en-us/library/windows/hardware/ff549553%28v=vs.85%29.aspx |