How to clean drives from right-click context menu in Windows with Disk Cleanup [Guide]

The Disk Cleanup utility is one of the system tools included with Windows. To open the utility click the Start menu, select All Programs, Accessories and System Tool folders. However, with a registry tweak you can add a Disk Cleanup shortcut to drives’ context menus.

Press Win + R to open Run, enter regedit and click OK. That should open the registry window below where you should browse to HKEY_CLASSES_ROOT\Drive\shell. There you should right-click shell, and select New > Key. Add the title diskcleanup to the new key, and double-click its (Default) on the right to open the Edit String window where you should enter Disk Cleanup as a data value.

Then you should right-click the diskcleanup key, and add a new key under it titled command. Double-click its (Default) to open the Edit String window. Enter cleanmgr.exe /d %1 as its data value, and click OK to close the Edit String window.

Now close the registry editor, and open Windows Explorer. When you right-click on one of your drives, you should find a Disk Cleanup shortcut option on the context menu as in the shot below. Click on that option to open the Disk Cleanup utility.

That’s just one way you can set up a shortcut for the Disk Cleanup utility. You could also add a Disk Cleanup utility to the desktop. Alternatively, right-click the Disk Cleanup.exe and enter a hotkey in the Shortcut key text box.

Subscribe to dotTech to never miss an article again!

About MatthewA

Matthew is a freelancer who has produced a variety of software articles for sites such as Bright Hub and Captured Snapshot. He has an A - Level in ICT, at grade C, and is proficient with a number of software packages. Matthew also has a golf blog http://amateurgolfer.blogspot.com/.Check out his book at http://battlesofthepacificwar.blogspot.co.uk/. Battles of the Pacific War 1941 -1945 recalls where, when and how the Pacific War was won and lost within the battlefields of the Pacific.