You can add Cleanup to the context menu of drives in File Explorer on Windows 10. You will get Cleanup as a verb in the drive's right-click menu. This will save you time, since you won't need to open the drive's properties any more. Here is how.
In our previous article, we saw how to add any Ribbon command to the Context menu in Windows 10. See
How to add any Ribbon command to the right click menu in Windows 10
In short, all the Ribbon commands are stored under the Registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell
You can export the desired command and modify the exported *.Reg in order to add it to the context menu of files, folders, or any other object visible in File Explorer. In our case, we need the command named "Windows.CleanUp".
Let's see how to speed up your work and add the useful Cleanup command to the context menu of drives in Windows 10.
Add Cleanup Drive Context Menu in Windows 10
Here are the contents of the *.reg file that you need to apply.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Drive\shell\Windows.CleanUp] "CommandStateSync"="" "ExplorerCommandHandler"="{9cca66bb-9c78-4e59-a76f-a5e9990b8aa0}" "Icon"="%SystemRoot%\\System32\\cleanmgr.exe,-104" "ImpliedSelectionModel"=dword:00000001
Run Notepad. Copy and paste the text above into a new document.
In Notepad, press Ctrl + S or execute the File - Save item in the menu. This will open the Save dialog.
There, type or copy-paste the following name "Cleanup.reg" including quotes. Double quotes are important to ensure that the file will get the "*.reg" extension and not *.reg.txt. You can save the file to any desired location, for example, you can put it in your Desktop folder.
Now, double-click the file Cleanup.reg that you created. Confirm the UAC prompt and click Yes to merge it into the Registry.
The command will appear in the context menu instantly.
To save your time, I made ready-to-use Registry files. You can download them here:
The undo file is included, so you can avoid manual Registry editing completely.
Alternatively, you can use Context Menu Tuner.
Tip: you might be interested in reading the following tips and tricks:
- Clear Temp Directory on Startup with Disk Cleanup
- Clear Temp Directory on Startup with Disk Cleanup
- Start Disk Cleanup With All Items Checked
- Disk Cleanup Cleanmgr Command Line Arguments in Windows 10
- Fix Disk Cleanup is missing in Drive Properties in Windows 10
That's it.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: