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

stukelly
  • 1,015
  • 13
  • 18
Magnetic_dud
  • 1,034
  • 2
  • 15
  • 28

3 Answers3

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

KevinH
  • 644
  • 4
  • 7
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.

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
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 '??'.

Jack B Nimble
  • 1,505
  • 1
  • 10
  • 13
  • \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