Sorry if this has been asked before, I've been looking around and it's hard to find what I want.
I know how to add a context menu item to a folder like so:
[HKEY_CLASSES_ROOT\Folder\shell\console2] @="Open Console2 Here" [HKEY_CLASSES_ROOT\Folder\shell\console2\command] @="C:\\Program Files\\Console\\console.exe -d \"\"%1\"\""
but, that only works for right clicking on a folder. I want it so that you can be inside the folder, and click a blank part of that folder and get the context menu item as well. I also tried HKEY_CLASSES_ROOT\Directory\shell
as well, but it does the same.
Add Any Program to Context Menu. Open the registry and navigate to the following path: HKEY_CLASSES_ROOT\Directory\Background\shell then right-click on shell and select New > Key. Give the new key the name of the program you're adding to the context menu.
To add a folder you access often to the context menu, select Folder in the Item type to add box. In the Program to add box, click Choose Folder. NOTE: You can also add files to the context menu. If you choose to add Any type of file, the Choose Folder button becomes the Search button.
Open the Windows registry by pressing the Windows key + R and typing “regedit” or by typing “regedit” at the Start menu. Navigate to and expand the HKEY_CLASSES_ROOT folder. Under this folder, the folders or keys that begin with a dot refer to file extensions. You can create a context menu item for any of these.
In File Explorer in Windows 11, the right-click context menu has been streamlined to make it easier to get to popular commands. You'll find your available options in a reorganized layout. To open the context menu, right-click (or press and hold) on a file or folder in File Explorer.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With