Category Archives: Computers

How to add “Empty Recycle Bin” option to the Windows 7 context menu

Now for a post that is a bit more technical in nature than what I normally write about (but I figure I’d help other people out who have been looking for a solution to this problem).

I’ve been a big fan of having an “Empty Recycle Bin” option on my right-click context menu in Windows (XP and Vista) for many years now. It acts as both a reminder as to whether I’ve deleted something (the option is active) or whether I’ve recently cleaned things out (the option is greyed-out). More importantly, it’s a great little shortcut to simply empty the recycle bin in Windows. With the upcoming release of Windows 7, though, the Registry edit to add the option no longer works. After some thorough forum- and web-searching, I’ve found the answer.

The old CLSID for the Recycle Bin was {645FF040-5081-101B-9F08-00AA002F954E}. You could simply add this as a new key to the HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\ registry entry, and the “Empty Recycle Bin” option would show up on your context menu whenever you clicked in blank space (either on your desktop or within a folder).

After rooting around a bit, it looks like a new command was added specifically to Windows 7 for the emptying of the recycle bin. If you look at this location: HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\empty , you’ll notice that there is now a command entry. Thus, to make this option work for the context menu on your desktop and folders, you simply need to duplicate the “empty” key and its “command” subkey in the appropriate location. Here’s the code to make this work (please be sure to always back up your registry before you make any changes – I take no responsibility for any problems or issues that may arise):


Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\empty]
"CommandStateHandler"="{c9298eef-69dd-4cdd-b153-bdbc38486781}"
"Description"="@shell32.dll,-31332"
"Icon"="shell32.dll,-254"
"MUIVerb"="@shell32.dll,-10564"
[HKEY_CLASSES_ROOT\Directory\Background\shell\empty\command]
"DelegateExecute"="{48527bb3-e8de-450b-8910-8c4099cb8624}"

Doing this even gives you the little Recycle Bin icon in your context menu. Cool! I hope this helps anyone out there looking for an answer to this problem!