I have a USB device that I use on Windows 7, 8, 8.1, and 10 machines. This device is (eventually) recognized by Windows Update on all these configurations, and a default driver is installed for the device. I would like to force this device to use a driver that I specify, which is not the default driver that Windows will select. I want to do this programmatically, preferably using components that are native to Windows (like batch or PowerShell), or are small enough that they could be included in a deployable installation package.
The goal is to find some programmatic way to replicate the functionality invoked by the following set of steps:
Open Device Manager --> Right-click on desired device to update --> "Update Driver Software..." --> "Browse My Computer For Driver Software" --> "Let Me Pick From A List Of Drivers On My Computer" --> Deselect "Show Compatible Hardware" checkbox --> Select manufacturer and model.
As far as I can tell, this effectively bypasses the default hardware IDs that are specified in the device's previously- or default-applied *.INF file.
I have tried performing this using devcon.exe (trying both the "install" and "update" functions), and found this to fail each time, no matter how generically I specified the device's hardware ID (without allowing it affecting other devices, of course). I can list the device's driver files, but cannot change them.
I also researched PnPUtil, but this does not appear to be suited for the application of applying a specific driver to a specific device.
Been poring over PowerShell's documentation, as well, and again can list the device and all of its properties (including it driver and driver files), but I have not yet found a way to forcibly, and programmatically, install the driver of my selection.
Any ideas on how to achieve the aforementioned goal? Thanks so much in advance.