Summary

In article 142 - How to hide the "Delete" command from Recycle Bin context menu in Windows Vista published on Feb 14 2007, I provided a .REG file which removes the Delete command from the Recycle Bin context menu in Windows Vista. That tip helped hundreds of users so far. This article explains how that tip works.

Creating a dummy "Delete" verb in the registry

After working for an hour in the registry, I found the way to hide (actually override) the system default Delete option in the Recycle Bin context menu. The trick was the create a dummy Delete verb in the registry, under the Recycle Bin namespace GUID, and assign it a different display name (such as "Search") by altering the (default) value for the Delete verb. The user will now see Search when they right-click the Recycle Bin, and the Delete option remains hidden, as we've just overridden it with Search.

Next task is to make the Search option operable. This is done by creating the sub-key named command, and assigning c:\windows\explorer.exe as the value data. However, I preferred %windir%\explorer.exe as in the above REG file.

HKEY_CLASSES_ROOT \ CLSID \ {645FF040-5081-101B-9F08-00AA002F954E} \ shell \ Delete \ command

Next step was to create a ddeexec branch, as you can see in the REG file in article 142 - How to hide the "Delete" command from Recycle Bin context menu in Windows Vista, and assigning appropriate data. The DDE string FindFolder invokes the Search window.

Editor's Note: Hope this little background information helps you override the Delete option in the Recycle Bin. Based on the idea above, you can add your own context menu entries in that location (Examples: "Open My Computer", "Clear Temporary Files" etc). Already I see my original tip being stolen and republished in other Websites (without my permission). Well. It happens!