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


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

| improve this answer | |
  • wow this looks great!!! thank youuuuu!! NirSoft really rocks! – Magnetic_dud Jun 18 '09 at 23:17

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.

| improve this answer | |
  • Kind of a distructive answer without a reboot command thrown in there - since the system will be left in an unusable state... – Kara Marfia Jun 17 '09 at 17:59
  • @Kara: For USB??? – Paused until further notice. Jun 17 '09 at 18:24
  • Unusable from the console, I should say, as the devices will not redetect. ;) – Kara Marfia Jun 25 '09 at 23:45

For storage volumes (USB drives) the Regisry Key is


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 '??'.

| improve this answer | |
  • \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... – Magnetic_dud Jun 17 '09 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.