Adding “Open with Console” to the context menu…

The other day I discovered that if you hold down the ‘shift’ key whilst right clicking on a directory in the Vista explorer you get a ‘Open Command Window Here’ entry in your context menu. You can do this on XP with a PowerToy or some registry jiggery-pokery but it was nice to have it out of the box in Vista.

Having picked up on the excellent ‘Console‘ from Ben’s post the other day I was back to having to ‘cd’ into directories again so set about rummaging in the registry. So… the fruits of my labours:

Add the key – HKEY_CLASSES_ROOT\Directory\shell\open_console

Set the value of that to whatever you want to appear in the context menu e.g. Open Console Here

Under that add the key HKEY_CLASSES_ROOT\Directory\shell\open_console\Command

Set the value of that to the path to your console.exe with the parameters -d %1 In my case that gave me C:\Program Files\Console 2 Beta\Console2\console.exe -d %1

There you go… You should now have the context menu entry. Right click on a directory and open Console on that directory. Coupled with e – texteditor’s “Open as e Project’ you can have your rails set up running in a jiffy.

I would like to add the ability to open a few tabs in Console from the context menu with the same command and maybe start a server running in one and have another ready for commands but I can’t seem to get that going at the moment as I’m no great shakes in the registry. If anyone could point me in the right direction for that I’d be most obliged… In fact, it would be nice to open the ‘e’ project and the Console tabs avec server etc with the one context menu command, perhaps ‘Open Rails Environment’ but maybe I’m getting carried away there…

About these ads

21 Responses to “Adding “Open with Console” to the context menu…”


  1. 1 Caelum May 26, 2007 at 9:46 am

    Had a problem with using the “console here” command when going to a folder with spaces in the path. So I changed the switch to -d “%1″ to get it to work. So C:\Program Files\Console 2 Beta\Console2\console.exe -d “%1″ to use your example.

    Just thought I would mention it for anyone who had the trouble and did not know how to fix it. Thanks for the top by the way :).

  2. 2 David Johnston October 25, 2008 at 7:40 am

    You can get the same thing in your context menu when you right click in a folder window that’s already open. Just add the same entries to HKEY_CLASSES_ROOT\Directory\Background\shell in addition to HKEY_CLASSES_ROOT\Directory\shell.

    Also, if you like having those options only available when you have the shift key depressed (like the stock “Open Command Window Here” menu item, you can add a string value called “Extended” to HKEY_CLASSES_ROOT\Directory\shell\open_console and
    HKEY_CLASSES_ROOT\Directory\Background\shell\open_console

  3. 3 dude October 26, 2008 at 7:32 pm

    Would love to know how to achieve this on WinXP.

  4. 4 MattyT January 7, 2009 at 4:40 am

    I’d also love to see it open a new tab if there was already an instance of Console2 open – and it seems I’m not the only one. I took a look at the tracker and these are relevant:

    “Option to restrict to a single running instance”

    http://sourceforge.net/tracker/index.php?func=detail&aid=1534902&group_id=43764&atid=437335

    “Add ‘Open Console Tab Here’ to Windows Explorer”

    http://sourceforge.net/tracker/index.php?func=detail&aid=1586273&group_id=43764&atid=437335

    May have to get dirty with the code and see what I can do!

  5. 5 Alexwebmaster March 3, 2009 at 11:48 am

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  6. 6 Caleb March 25, 2010 at 7:17 pm

    Thanks for the snippet, I was having trouble figuring out how to pass the working directory argument to Console2 and this works like a charm.

  7. 7 J-Mac June 10, 2011 at 7:16 pm

    Wow, great write up. Was looking to do this and your tutorial was perfect.

  8. 8 bla November 25, 2011 at 12:53 pm

    I was looking for a way to do this, but for some reason, your solution wasn’t working on system.
    I worked around this by replacing the the “cmd.exe” by the path to my console.exe on the windows cmd keys (HKEY_CLASSES_ROOT\Directory\shell\cmd\Command and HKEY_CLASSES_ROOT\Background\shell\cmd\Command)

  9. 9 bla November 25, 2011 at 4:41 pm

    Nevermind my last comment, it’s wrong.
    What I want was to right-clik on a blank space at some folder’s window, and get the option to ‘Open console here’, just like the windows cmd.
    Ir order to do that, one must replace the %1 with %V on the windows registry keys. Not it works.

  10. 11 Quang January 22, 2012 at 2:55 am

    Many thanks for the blog owner, Caelum, David Johnston, and bla for your advise. Like many others, I come here through Google and really appreciate your sharing.

  11. 12 John Baughman January 30, 2012 at 8:15 pm

    And my thanks to all for the tips! My console has never looked or behaved so beautifully! The background menu tip was an awesome boost for another tool I created for grabbing the folder path to the clipboard…!!

  12. 13 Search.Theregister.Co.Uk May 15, 2013 at 1:44 pm

    You will need to determine if it is the humidity and sweating that you are
    suffering from, as this can be relatively easy to fix. A study in the British Medical Journal found a significant connection between
    a person”. The first step in the process of maintaining a mosquito-free bedroom
    is to secure the structure of the house.

  13. 14 Harley May 30, 2013 at 3:58 am

    Please note doctors don’t prescribe oral medicines for vaginal infections, it can lead to side-effects. As you progress to the next higher level, the game becomes tougher. if you’re under 120 lbs, unless
    you’re really short you are NOT overweight.

  14. 15 tonsil stone extraction video July 24, 2013 at 11:12 pm

    Very quickly this web page will be famous among all blog users, due to it’s fastidious articles or reviews

  15. 16 Senaida February 18, 2014 at 10:36 pm

    I was wondering if you ever thought of changing the layout of your website?
    Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of
    content so people could connect with it better. Youve got an
    awful lot of text for only having one or two pictures.
    Maybe you could space it out better?


  1. 1 Windows Vista Tweaks - USA-MS Trackback on May 10, 2007 at 11:26 am
  2. 2 chineseman Trackback on December 31, 2008 at 1:18 pm
  3. 3 Adding open in console to the context menu Trackback on June 19, 2010 at 1:54 pm
  4. 4 Console2: die bessere Windows-Console « Wissenswertes Trackback on June 16, 2012 at 9:15 am
  5. 5 Blog bookmarks 12/04/2012 « My Diigo bookmarks Trackback on December 4, 2012 at 5:30 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.

Join 37 other followers

%d bloggers like this: