Windows shell add item to context menu when click on blank part of folder
I figured out the answer. The folder is actually Directory\Background
, you have to add the empty string value of NoWorkingDirectory
into it, and the %1
in the command becomes a %V
[HKEY_CLASSES_ROOT\Directory\Background\shell\console2]@="Open Console2 Here""NoWorkingDirectory"=""[HKEY_CLASSES_ROOT\Directory\Background\shell\console2\command]@="C:\\Program Files\\Console\\console.exe -d \"\"%V\"\""
Source:saviert's comment at http://www.howtogeek.com/howto/windows-vista/make-command-prompt-here-always-display-for-folders-in-windows-vista#comment-57856
Console2 rocks. I added an 'Cmd here (Console2)' item to my explorer context menu.
Save the text below in a file named open-console2.reg
then open it to import it to the Windows registry.
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\console2]@="Cmd here (Console2)""NoWorkingDirectory"=""[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\console2\command]@="\"C:\\Program Files (x86)\\Console2\\Console.exe\" -d \"%V\"\\"
Bonus 'bash here' item (assumes you have a Console2 tab named 'bash').
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\console2_bash]@="Bash here (Console2)""NoWorkingDirectory"=""[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\console2_bash\command]@="\"C:\\Program Files (x86)\\Console2\\Console.exe\" -t Bash -d \"%V\"\\"
I think the relevant part of the TortoiseSVN installer is here. Perhaps you can figure out all the necessary registry keys from that.