none
Dealing with multiple device drivers for same device RRS feed

  • Question

  • We have a USB device that has two different device drivers. If we plug it in we have to choose which one we want it to use. That is fine. And if we unplug it and plug it back again Windows remembers which driver we were using. But if we unplug it, plug in a memory stick to the same USB port, unplug the memory stick, then plug in our device to the same port again the SOMETIMES the “New Hardware Wizard” box comes up and we have to specify which driver to use again. The behavior we want is for Windows to remember which driver was being used for our device and just use that same one each time. Is there a way to influence this behavior? Is there a programmatic way to make Windows forget its setting if it has the wrong driver?

    A bit more about our situation. We historically use driver set “A” . But we created an application to use drive set “B”. Now we want to change the application to use driver set “A” again. We have customer machines in all combinations of driver sets now : none, just “A”, just “B”, and both. So when we install our application update we want to install driver set A. We can not uninstall driver set “B” because other things use it. One idea we have is to delete the .inf file for driver B for our device from the windows\inf directory and in the future Windows would not get confused. But for that to work the first time I think we would still have to make Windows forget it is already using driver B. Any thoughts or tips please?

    Friday, November 4, 2011 4:56 PM

All replies

  • the install state should never be lost when you plug it into the same port. are you sure you are replugging it into the same port with the same topology behind that port?  if it is a different port or the hub the port belongs to is plugged into a different downstream port, the device's identity is now different (and thus the new hw prompt).  if your device has a serial number, none of this applies because the serial number is the identity.
    d -- This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, November 4, 2011 5:04 PM
  • Someone noticed that if the device is in zombie state, a new instance will be created, even if it has a serial number:

    Subject: RE: USB serial Number problem :STORAGE_DEVICE_DESCRIPTOR
    From: Tim Green 
    Sent: Nov 02, 2011 13:06
    Newsgroups: ntdev
    
    "I have seen it replaced with a random unique number, especially if you do a fast unplug/replug while there are open handles on the device."
    
    
    Regards,
    -- pa
    Friday, November 4, 2011 7:01 PM
  • Thanks Pavel.

    That could explain the intermittant nature of the problem as it was described to me.  These buggers do have serial numbers.  How would I look at the number?  That would be a clue if I see it happen myself.,

    Thanks,

    Chas

     

    Friday, November 4, 2011 8:56 PM
  • the device instance hung in the surprise removed state will not change the identity of the device if it is plugged in again. that is a red herring IMHO
    d -- This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, November 4, 2011 9:20 PM