How can I remove all drivers and other files related to a USB Mass Storage device?

13,088

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.

  1. Navigate to %SystemRoot%\System32\DriverStore\

  2. Right click on INFCACHE.1, click properties

  3. Security tab, click Edit

  4. Click Add, type Administrators in the provided box and press Ok

  5. Tick Full Control

  6. Click Ok in both open dialog boxes

  7. Delete the file

  8. Insert a known good flash drive

  9. Insert the previously broken flash drive

Share:
13,088

Related videos on Youtube

tvdo
Author by

tvdo

Just a random fox passing through. You have backups, right? backup-brigade

Updated on September 18, 2022

Comments

  • tvdo
    tvdo almost 2 years

    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!

    • Admin
      Admin over 11 years
    • Admin
      Admin over 11 years
      @Moab Unfortunately, it appears to have the same effect as uninstall + restart + reinstall: the drive works on the first insertion. After that, it fails again. That program does not appear to touch any driver files; merely registry entries - so if it is a corrupted driver file somewhere... In any case, I'm gonna go run a sfc /scannow now.
    • Admin
      Admin over 11 years
      At the command prompt, type in set devmgr_show_nonpresent_devices=1 and press Enter. ow again in command prompt line, type devmgmt.msc and press Enter. This will launch the Windows Device Manager Console. From the View menu, select Show Hidden Devices. You can find your offending device, right-click, and choose uninstall to remove it from the system completely.
    • Admin
      Admin over 11 years
      @Bob check out here may be it can help you.
    • Admin
      Admin over 11 years
      @avirk I have already tried that manually (I was uninstalling it while it was connected; there are no more ghost devices under 'show_nonpresent'). Also, Moab's suggestion does a registry clean of all such entries. I'll try your second suggestion after SFC finishes.
    • Admin
      Admin over 11 years
      @avirk Same situation, though it appears to remove different registry keys tan Moab's suggestion. Also, SFC found nothing wrong.