Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

[HKEY_CLASSES_ROOT\Directory\shell\open_console]
@=Open Console2 Here
Icon=C:\Program Files\Console2\Console.ico

[HKEY_CLASSES_ROOT\Directory\shell\open_console\Command]
@=C:\Program Files\Console2\Console.exe -d "%v"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\open_console]
@=Open Console2 Here
Icon=C:\Program Files\Console2\Console.ico

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\open_console\Command]
@=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?

share|improve this question
    
You could right click > Open folder location before opening console. Kind of a temp solution, but it works. –  Sam Jan 21 '13 at 8:34

1 Answer 1

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

[HKEY_CLASSES_ROOT\LibraryFolder\Background]

[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell]

[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\cmd]
@="@shell32.dll,-8506"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

HTH

-(e)

share|improve this answer
2  
I have been looking for this functionality for a long time, thanks for sharing! –  jasondavis Apr 16 '13 at 13:26
    
Amazing... all along the reason it wasn't working was due to explorer treating library folders differently. Thanks for this! –  Taliesin Jul 24 at 7:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.