How can I remove all drivers and other files related to a USB Mass Storage device?
I have a flash drive here that does not work on one OS on computer - let's call it the desktop Windows 7. It works fine on another computer - laptop Windows 7. It also works fine on Windows 8 on the same desktop computer. Other flash drives work fine under desktop Windows 7. So not a hardware issue, not a generic USB Mass Storage driver issue. It's something specific to this drive.
On desktop Windows 7, I can connect the drive but no volume comes up under Windows Explorer. Ditto for Disk Management. With diskpart
, loading hangs until I unplug the drive, if I replug it and try list disk
it hangs again. If I unplug the drive at this point, list disk
prints out all attached drives - including the just removed flash drive.
The drive consistently appears under Device Manager, but uninstalling the drivers, restarting and reinstalling the drivers (by inserting the drive) only works for the first insertion. After that it fails again. I get the feeling that the driver files are not actually removed, and are corrupted, meaning every reinstall it's the same corrupted drivers being installed. Is there any way to remove these drivers completely? Or perhaps some other setting Windows 7 retains?
Formatting the drive through another computer/OS does not help. I've also tried a complete wipe and rebuild of the MBR and single partition. The allocation unit size makes no difference; neither does a NTFS format.
This is a relatively small matter, and I would not like to reinstall the entire OS!
Solution 1:
It appears to have been a corrupted driver cache. Following this guide, I deleted the INFCACHE.1
file located under %SystemRoot%\System32\DriverStore\
.
The first thing I did was erase all traces of past connected drives using the USBOblivion tool suggested by Moab. Then I deleted the driver cache file.
Navigate to
%SystemRoot%\System32\DriverStore\
Right click on
INFCACHE.1
, click propertiesSecurity tab, click Edit
Click Add, type
Administrators
in the provided box and press OkTick
Full Control
Click Ok in both open dialog boxes
Delete the file
Insert a known good flash drive
Insert the previously broken flash drive