How-To Geek

Make "Command Prompt Here" Always Display for Folders in Windows Vista

We’ve previously explained how you can open a command prompt by holding down the Shift key and right-clicking on a folder or the desktop… but how do you make that item show up without having to hold down the shift key?

There’s a simple registry hack you can do that will enable “Open Command Window Here” item without holding down the shift key:


You can either manually edit the registry, or use the downloadable registry hack files to do it.

Manual Registry Hack

Open up regedit.exe through the start menu search or run box, and then browse down to the following key to add the right-click menu to drive icons:



Rename the “Extended” key on the right to something else, like “Extended-Orig”. (Note that you could simply delete the value, but renaming it ensures that you can quickly rename it back to reverse the change)

To add the item to the folder context menu, browse down to the following key:



And rename the same “Extended” key here. The changes should be immediate.

Downloadable Registry Hack

Simply download, extract, and double-click on the EnableCommandPromptHereAlways.reg file to enter the information into the registry. There’s also an included file to reverse the change.

Download EnableCommandPromptHereAlways Registry Hack

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 06/20/08

Comments (18)

  1. Jeff

    Thanks very much for that. I’ve always wondered why Microsoft made you press the shift-key to see that item as I use it a log.

  2. Marty

    I’ve been trying to figure out how to do the same thing for “Copy as Path” which I use all the time. I can’t figure it out, any ideas?

  3. The Geek


    I’m not sure how to make the “official” one work… but I can make another one that works exactly the same, without the shift key.

    Will get back to you on that.

  4. shelded

    The “copy as path” feature is useless to me since it encloses in quotes which I then have to remove. I reverted to what I used on XP, a freeware utility named Path2Clipboard by Valery Domozhirov.

  5. Marty

    There’s lots of freeware tools that do this, but I want something I can easily change through a logon script, so it’s there on every machine I logon to, without installing anything. I use a lot of different machines and a roaming profile is not an option.

    Currently I’m using clip.exe, somthing like this:

    @=”Cop&y Path To Clipboard”
    @=”cmd.exe /c echo \”%1\”|clip.exe”

    which works OK, but it flashes a cmd window and it adds a line feed character so when you paste it, it’s like the enter key was pressed and then you need to press the up arrow key to recall it.

  6. The Geek


    Do all the machines have clip.exe on them, or can you do a mapped drive?

  7. shelded

    Fine, Marty, don’t install anything; instead, hack the registry on every computer you use. (?)

  8. The Geek


    I imagine Marty is an admin on a network… adding tools and registry hacks into the login script is a classic technique so you’ll have the same environment everywhere you are… makes it much easier to work on a user’s system.

    I used to be an admin… a long time ago.

  9. Marty

    Yes, clip.exe is available on a mapped network drive, which is included at the end of my search %PATH%.

    @shelded: Your current user registry is yours to do whatever you wish. Hundreds of changes are made to your registry hive every time you log on, you just don’t know it. Admins who know what they are doing don’t use the term “hack the registry”, that’s a term used to scare off poeple who don’t know what they are doing.

  10. Jim Cauble

    Thank you! I was bummed out when I couldn’t find PowerToys for Vista, and those from XP didn’t work. I use “command prompt here” a lot, and missed this facility, that should have been included in the base system.


  11. Andy Kovacs

    This is great to just press shift but what if you need to open a command prompt as a administrator for vista or Windows 2008?

  12. saivert

    You also have to rename the key HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\extended in order to get the same context menu item on folder backgrounds (right click any empty area in a explorer folder view).

  13. dude

    Regarding the post from saivert – how is it possible to add the open cmd here context menu entry for folder backgrounds in windows xp?

  14. Eduardo

    I tested this script in Windows 7 RC and it didnĀ“t work. Someone knows why?

  15. James

    Did you guys figure out how to get “Copy as path” to always show in the context menu?

  16. ic@

    Thank you, saivert! That’s exactly what I was looking for.

  17. Chaz

    I must of done something wrong because it did nothing.

  18. jamesn

    I did exactly the same as use. On windows 7 using this means that the Path environment variable (or Path variable) is not extended to the one defined by system, instead it uses a short Path environment variable which only seems to include visual studio and matlab paths (and of course the default system32 etc.).

    Does _ANYONE_ know how you can edit the %PATH% variable and still use “Open windows prompt here”? It seems impossible to get python and other PATHs in there :-(

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!