Programmatically Install "Incompatible" Driver For USB Device Programmatically Install "Incompatible" Driver For USB Device powershell powershell

Programmatically Install "Incompatible" Driver For USB Device


USB host (Windows) selects the suitable driver based on the descriptors the device returns when asked (in some cases the drivers are loaded per interface, in that case you need to read the interface descriptor). The device descriptor can contain following information:

bcdUSBbDeviceClassbDeviceSubClassbDeviceProtocolbMaxPacketSize0idVendoridProductbcdDeviceiManufactureriProductiSerialNumberbNumConfigurations

The generic (default) class drivers are usually selected based on bDeviceClass, bDeviceSubclass and perhaps some other details. If the device vendor wants their driver to override the default driver, they implement an .inf file for idVendor and idProduct and make that point to their driver. That is what you should do if you want to override the default driver. I would say, even if you want to do it in the code, you need to generate that inf file. This is pretty good source of information, even if you are not implementing the driver yourself.


If your device IS NOT plug and play and if it could be plugged into machine during operation, you could try to use DevCon and perform its Install and Update functions.