Windows Custom Context Menu
Folder Background HKEY_CLASSES_ROOT\Directory\Background\shell\<NAME> Folder HKEY_CLASSES_ROOT\Directory\shell\<NAME> File HKEY_CLASSES_ROOT\<FILE_EXTENSION>\shell\<NAME>
Note: For User specific
Example for Directory Background
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\CaddyStart] @="CaddyStart" "Extended"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\CaddyStart\command] @="cmd.exe /k caddystart.bat"
If „Extended“ is present, the Entry is hidden until shift is pressed while opening the context menu.
%* – Replace with all parameters. %~ – Replace with all parameters starting with and following the second parameter. %0 or %1 – The first file parameter. For example "C:\Users\Eric\Desktop\New Text Document.txt". Generally this should be in quotes and the applications command line parsing should accept quotes to disambiguate files with spaces in the name and different command line parameters (this is a security best practice and I believe mentioned in MSDN). %<n> (where <n> is 2-9) – Replace with the nth parameter. %s – Show command. %h – Hotkey value. %i – IDList stored in a shared memory handle is passed here. %l – Long file name form of the first parameter. Note that Win32/64 applications will be passed the long file name, whereas Win16 applications get the short file name. Specifying %l is preferred as it avoids the need to probe for the application type. %d – Desktop absolute parsing name of the first parameter (for items that don't have file system paths). %v – For verbs that are none implies all. If there is no parameter passed this is the working directory. %w – The working directory.