Saturday, July 18, 2015

To remove a wrong driver in windows

Was unable to connect a neighbor's Nook Color as a mass storage drive to a windows computer. Turned out the ClockworkMod universal ADB drivers installed earlier have a priority and won't let the usbstor.sys (the mass storage) to be selected a the primary device driver. Uninstalling the driver for the device in the Device Manager did not help, it appeared again after the device was unpluged and then plugged again.
Knowing the vendor and product IDs (for the Nook Color they are VID_2080&PID_0002), I found the ClockWork's oem##.inf file in the %SystemRoot%\inf folder.
Where ## is a number of the .inf file where the device VID and PID were mentioned.
Tried to delete that oem##.inf and then reboot the PC, did not help.
But what did help, is Window's pnputil utility.
Execute the following command as administrator and then even no need to reboot:
pnputil -d oem##.inf

Also, there is an useful utility to maintain the currently and previously connected USB devices.