Search code examples
registry

Add custom context menu to explorer for directory\background


I have successfully added my own context menu item to all files (HKEY_CLASSES_ROOT\*\shell\[mycontextmenu]) as well as to folders (HKEY_CLASSES_ROOT\Folder\shell\\[mycontextmenu]), but when I add it to HKEY_CLASSES_ROOT\Directory\Background\shell\\[mycontextmenu], it throws the error

This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel.".`

Everything I've googled says to just associate a file to a specific application, I just want to execute MY application, and pass the directory that the user right-clicked in.

Any help, or links to where I can find out how to do this?

Thanks


Solution

  • Here's the link that shows how to do this, and the %V is the parameter to get the path where it was clicked from.