I just finished setting up my Dev environment on a Windows 7 PC. For command line and Terminal use, I installed the program called Console2 which is amazing for anyone who uses the Terminal on a Windows machine.

One of the important things I needed was the ability to access folders in the terminal quickly without always doing cd /directroy/name/etc/etc so my goal was a Right Click Context Menu inside of a folder in Explorer.

I was able to get this done with the following Registry Key modifications/additions

@=Open Console2 Here
Icon=C:\Program Files\Console2\Console.ico

@=C:\Program Files\Console2\Console.exe -d "%v"

@=Open Console2 Here
Icon=C:\Program Files\Console2\Console.ico

@=C:\Program Files\Console2\Console.exe -d "%v"

It works great, I can now see a context menu to open a terminal window at a folder's path in 2 way.

  1. By right clikcing on a folder name, it will show the "Open Console2 Here"
  2. By opening a folder and right clikcing in the background, I can see the same context menu to open terminal as well.

Now my problem is I often access folders and work areas using Windows Libraries, this make my context menu not work when I am accessing a folder through the Library instead of going directly to the folder.

For example if I open Explorer and go to...

E:\Server\htdocs\labs\javascript\SampleJSProject then I can view and use my custom context menu.

However if I access that same folder using my shortcut/libraries, the path then looks like this...

Libaries\Server Labs\javascript\SampleJSProject and now my context menu to open terminal does not show up. If I click in the Address area it then shows the correct full path as listed above though.

I am hoping it is an easy solution, like adding another registry key somewhere but I am not sure where?

Does anyone have any ideas or solutions?

  • You could right click > Open folder location before opening console. Kind of a temp solution, but it works.
    – Sam
    Jan 21, 2013 at 8:34

2 Answers 2


The trick here is that Library Folders have their own key.

Oddly enough its "LibraryFolders" so you would need to modify THAT key to get the effect you want.

For example, to add the "Open command window here" context entry to a Library Folder, use the following reg:

Windows Registry Editor Version 5.00




@="cmd.exe /s /k pushd \"%V\""



  • 3
    I have been looking for this functionality for a long time, thanks for sharing!
    – JasonDavis
    Apr 16, 2013 at 13:26
  • 1
    Amazing... all along the reason it wasn't working was due to explorer treating library folders differently. Thanks for this!
    – Taliesin
    Jul 24, 2014 at 7:01
  • @jasondavis please mark the answer as correct if it worked for you. Apr 19, 2015 at 17:27

To expand on sweetlilmre's answer:

If you don't have the rights to edit HKEY_CLASSES_ROOT (a problem that arose for me on my company laptop), you can also edit HKEY_CURRENT_USER\Software\Classes\LibraryFolder\Background\shell\cmd\command.
You may have to create LibraryFolder and its sub-keys (I had to), but it's enough to create empty keys.
cmd can also be named differently, the only thing that matters is the value of that key (which is the text shown in the context menu) and the command key, whose value will be executed. It's apparently sufficient to use cmd.exe as the command; the command line automatically launches in the directory you right-clicked in, no additional parameters necessary (at least on Win 7 Enterprise, which I'm using).

I'm not particularly familiar with registry-editing scripts, so I did this stuff manually. If anyone knows how to phrase the information above in a script, feel free to edit it into this answer.

Bonus: if you add a string key to cmd (or whatever you named it) called "Icon" and set to "cmd.exe", your context menu entry will also be accompanied by an icon.

See these images on how your registry should look like after the above steps (as mentioned, LibraryFolder is a child of HKEY_CURRENT_USER\Software\Classes):

enter image description here

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .