DriveCleanup does what you could do manually in the Windows Device Manager - remove all currently non-present USB, Disks, CDROMs, Floppies, Storage Volumes and WPD devices from the device tree.
Download
DriveCleanup does what you could do manually in the Windows Device Manager - remove all currently non-present USB, Disks, CDROMs, Floppies, Storage Volumes and WPD devices from the device tree.
Removes from the device tree non present:
USB hubs
USB mass storage devices
Disk devices
CDROM devices
Floppy devices
Storage Volumes
WPD devices (Vista, Win7, Win8 and higher only)
and their registry items under
HKEY_LOCAL_MACHINESYSTEMMountedDevices
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetEnum
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlUsbFlags
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlDeviceClasses
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerMountPoints2
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerMountPoints2CPCVolume
Disk, CDROM and Floppy devices are removed only if they are USB or if they have a removal policy > 1 (EXPECT_ORDERLY_REMOVAL or EXPECT_SURPRISE_REMOVAL).
Download