Drive Cleanup
Drive Cleanup
Works under Windows XP and higher only. Under x64 edtitions of Windows
only the x64 version works.
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EMDMgmt
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\
CPC\Volume
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\
Volume
Usage:
Called with admin previleges and without a parameter it removes all types of
devices
listed above and cleans the registry.
Without admin previleges it switches to test mode and shows the items it would
remove.
Samples:
DriveCleanup -t
test mode, lists devices and registry items to remove
DriveCleanup
removes non present devices related to drives and their registry items
DriveCleanup -v -d
removes non present USB Storage Volumes and USB Disks
DriveCleanup isn't stricly limited to drives. USB hubs, UsbFlags and the Enum\
NextParentID.xxxxx.n
values may be not drive related.
Since V1.4 volumes of the Windows volume shadow copy facility are't skipped
anymore. Before they where skipped
because I wasn't sure if it is ok to delete them. Since Microsoft offers it's own
tool to do so, I is ok
obviously: https://support.microsoft.com/en-gb/help/982210
Licence: Freeware
Allowed:
- usage in any environment, including commercial
- include in software products, including commercial
- include on CD/DVD of computer magazines
- making available for download by means of package managers
Not allowed:
- modify any of the files
- offer for download by means of a "downloader" software
Uwe Sieber
May 2022