In the registration editor (regedit.exe) find:
- Context menu for right click on folders in left panel of Windows Explorer or on background of a directory in right panel:
HKEY_CLASSES_ROOT\Directory\Background\shellif you are administratorHKEY_CURRENT_USER\Software\Classes\directory\Background\shellif you are a normal user
- Context menu for right click on folders in right panel of Windows Explorer:
HKEY_CLASSES_ROOT\Directory\shellif you are administratorHKEY_CURRENT_USER\Software\Classes\directory\shellif you are a normal user
- Context menu for any file:
HKEY_CLASSES_ROOT\*\shellif you are administratorHKEY_CURRENT_USER\Software\Classes\*\shellif you are a normal user
In all cases:
- add a new key under
shell, naming it as you want to name the
context menu item - add a new key inside this key, named
command(mandatory name) - edit the
defaultproperty incommandto
myprogrampath\path\path\executable.exe "%1"to pass the file path and
name of the selected file to your custom program (for.../Directory/Backgroundand.../directory/Backgroundcases use%Vinstead of%1)
More customization:
- Add icon: add a string value named
iconfor key created at step 1 with value matching an icon resource path. You can also provide an integer arguments to specify which icon to use. Example:%SystemRoot%\System32\shell32.dll,3 - Display only on shift-click: add an empty string value named
Extendedfor key created at step 1 - Customize menu entry label: change the value of default value for key created at step 1
- Change menu entry location: add a string value named
Positionwith one of:Top,Bottom