Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Use "Command Prompt Here" in Windows Vista

A very popular registry hack for Windows XP was the "Command Prompt Here" hack, that would automatically open a command prompt window in the directory that you had clicked on.

Windows Vista includes this ability right out of the box, it's just not immediately obvious, because it's hidden behind a shortcut key.

To activate this, just hold down the Shift key when you right-click on a folder, and you should see the Open Command Window Here menu item:

Just like that, a command window opens with that path as the working directory

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 03/15/07 and tagged with: Windows Vista, Vista Tips & Tweaks

Comments (13)

  1. Brent Rockwood

    This seems to only work in the listview area of explorer, not if you click on folders in the treeview.

  2. Hans Felsh

    just like every other version of Windows, you can edit the registry to add the Open Command Prompt Here to the right-mouse click menu. Copy and paste the following text into Notepad, save it a a .reg file, then simply double-click the .reg file and import it into the registry:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Prompt]
    @="Open Command Prompt Here"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Prompt\command]
    @="Cmd.exe /k pushd %L"

  3. Rick

    It also has a "copy as path" option

  4. Scott Marlowe

    The registry hack works beautifully! Thanks.

  5. anthony

    Holding shift didn't work, registry script did. Thanks.

  6. Knud Henrik Strømming

    Copy-paste the content below into a REG-file and import it into the Registry to add a similar shortcut to the contect menu for drives as well. The ampersand in the "Open Command &Prompt Here" string adds a keyboard shortcut (mark the drive, press the Windows key, press the P key to open the command prompt window using the keyboard).

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Command Prompt]
    @="Open Command &Prompt Here"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Command Prompt\command]
    @="Cmd.exe /k pushd %L"

  7. Knud Henrik Strømming

    Ohh, sorry, not the Windows key, should have been the Contect Menu key. :o ]

  8. shaggy

    does this reg-key also work on Win2003 Server?

    shaggy

  9. Knud Henrik Strømming

    >>Shaggy

    Oh yes! For Windows 95/98/Me/NT4/2k/XP/2k3 you only need the command "cmd.exe", but for Win2k3 the command "cmd.exe /k pushd %L" will work as well.

  10. shaggy

    Thank you Knud, right click and context menu work fine on my Win2k3 :)

  11. Tom

    Thanks! Wasn't in my vista for some reason, but the reg hack worked a treat =)

  12. Bob

    Hey, I was wondering if anyone could tell me some tricks for the command prompt. I have a vista and was wondering if u had any coool tricks for me. Thanks….

  13. robin singla

    hi bob …..first of all you go to run and then write "cmd"in run then enter you will get command prompt .If u want to know about ur notebook mac address or physical address then you write "ipconfig/all" in command prompt and press enter , u will get all physical address of ur network.


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.