6

On our computers, we use daily dozens of different usb drives from our customers.

This is bad because the registry hive is becoming huge as windows is so "smart" to save them forever

I set devmgr_show_nonpresent_devices=1 and i saw thousands of usb flash drives

There is a software that will automagically delete all previous devices?

Also this will solve a lot of problems with scanners and printers that will be seen as another device just because the user has plugged in another usb plug

3 Answers 3

4

Try USBDeview from NirSoft. From the website:

"USBDeview is a small utility that lists all USB devices that currently connected to your computer, as well as all USB devices that you previously used. For each USB device, exteneded information is displayed: Device name/description, device type, serial number (for mass storage devices), the date/time that device was added, VendorID, ProductID, and more... USBDeview also allows you to uninstall USB devices that you previously used, and disconnect USB devices that are currently connected to your computer. You can also use USBDeview on a remote computer, as long as you login to that computer with admin user."

The interface supports sorting and multiple select and remove. Download here

1
  • wow this looks great!!! thank youuuuu!! NirSoft really rocks! Jun 18, 2009 at 23:17
3

Microsoft has a command line utility called DevCon which may do what you need.

List present and non-present USB devices:

devcon findall =usb

Remove all USB devices:

devcon remove @usb\*

Proceed with caution. You might need to do a devcon rescan or even a devcon reboot afterwards.

3
  • Kind of a distructive answer without a reboot command thrown in there - since the system will be left in an unusable state... Jun 17, 2009 at 17:59
  • @Kara: For USB??? Jun 17, 2009 at 18:24
  • Unusable from the console, I should say, as the devices will not redetect. ;) Jun 25, 2009 at 23:45
1

For storage volumes (USB drives) the Regisry Key is

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\STORAGE\Volume

A little testing revealed that Non present devices have '??' in the key name. One could write a simple program or script to cycle through the key names and delete the ones that have '??'.

1
  • \storage\ contains IDE/SATA drives, and yes, the non present devices have '??' in the name. But maybe the right one is \USBSTOR\? In this case, the non present devices have a normal name... Jun 17, 2009 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .