DriveCleanup - remove nonpresent drives from the registry
DriveCleanup removes all currently non present "Storage Volumes", "Disk", "CDROM", "Floppy" USB drives and their USB devices from the device tree. Furthermore it removes orphaned registry items related to these device types. Since V0.8 it removes WPD devices under Vista and Win7.
Started with parameter -T (like test) it shows which devices it would remove.
DriveCleanup -T
Started without a parameter, it does its job without further inquiry.
To remove certain types of devices there are the parameters -U -D -C -F -V -W and -R.
Sample to remove abandoned registry entries only:
drivecleanup -R
Under x64 editions of Windows only the included x64 version works correctly, with the Win32 version you will see "severity error 0x235", which is ERROR_IN_WOW64.
Admin privileges required.
Download V0.8.1 (Bugfix for Win8):
http://www.uwe-sieber.de/files/drivecleanup.zip
Download V0.8.0 (WPDs):
http://www.uwe-sieber.de/files/drivecleanup080.zip
Download V0.7 (without WPDs):
http://www.uwe-sieber.de/files/drivecleanup07.zip
Download V0.4 (without registry cleaning):
http://www.uwe-sieber.de/files/drivecleanup04.zip