26

When you hold Shift while right-clicking a folder in Windows, the context menu includes the option to Open command window here.

Is there a registry tweak, or an extension/add-on, which frees you from the need to hold Shift for this operation?

0

6 Answers 6

19

Write up on How To Geek, they also include downloadable reg files to make the edits for you, or open regedit and navigate to:

HKEY_CLASSES_ROOT\Drive\shell\cmd

Change the name of the key "Extended", or just delete it, this will give you “Open Command Window Here” on right clicking drives.

For directories do the same thing as above here:

HKEY_CLASSES_ROOT\Directory\shell\cmd
5
  • Not sure what is hard to follow, it's a simple renaming of 2 entries and even then you could just delete them. He suggested renaming because you can rename them back to get original functionality. Anyway, +1 for correct answer. Although usually it's good to write down the procedure in addition to linking to original, since if linked page becomes unavailable, your answer would be meaningless. Feb 1, 2011 at 10:17
  • Now that I've re read it after some time away from the PC it does make perfect sense... I'll amend my answer with the steps.
    – Windos
    Feb 1, 2011 at 10:34
  • So can you add entries to the hidden list by adding that registry entry?
    – paradroid
    Feb 1, 2011 at 11:43
  • @paradroid: I believe that's the case, yes.
    – afrazier
    Feb 1, 2011 at 13:57
  • @paradroid: I don't see why not. I might play around with it a work if there is a lull.
    – Windos
    Feb 1, 2011 at 17:37
15
  1. Start / regedit

  2. Browse to each of the following keys in the registry tree:

    HKEY_CLASSES_ROOT\Drive\shell\cmd
    HKEY_CLASSES_ROOT\Directory\shell\cmd
    HKEY_CLASSES_ROOT\Directory\Background\shell\cmd  
    
  3. Delete the file 'value' called 'Extended'.


Alas the Registry Editor doesn't have a URL bar before Windows 10, so navigating to find those three folders is more tedious than it could be.

4
  • 4
    +1 for covering HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
    – trlkly
    Oct 21, 2014 at 10:43
  • 1
    I had to this again after installing Windows 10 'anniversary update' Aug 5, 2016 at 12:03
  • "Error deleting values: Unable to delete all specified values." Yours faithfully, Windows 10 Pro, version 1607
    – Samir
    Sep 19, 2016 at 16:43
  • Windows 10 'creators update' just undid this again for me Apr 30, 2017 at 20:50
8

I like using the small CmdOpen shell extension. It will replace the built-in functionality and enhance it by adding an Open Elevated Command Prompt Here option. It also adds entries to the context menu of the folder background, so you don't have to mouse over to the tree view and hit a small target (or go up a folder if you have the tree hidden).

4
  • This was my favorite on Windows 8.1. Any idea if it still works on Windows 10? I know it says Windows 2000 or higher on the web page, but I also know that Windows 10 has been misbehaving on my PC when I used some of these extensions from the web. Probably due to Microsoft's addition of its own for both normal and elevated command prompts in the new File Explorer.
    – Samir
    Sep 19, 2016 at 16:51
  • @sammyg: I haven't tried it because I just put the buttons I wanted for that on the Quick Action Bar (hint: Right-click on Ribbon or Menu Items), but I'm using HashCheck from the same author and it works fine on Windows 10. It just needs re-installed when new builds of Windows are delivered. (Which -- if you're on the Fast Ring -- is often.)
    – afrazier
    Sep 19, 2016 at 17:58
  • That's funny how compatibility of such simple apps breaks on each new build of Windows 10. I'm on the slow ring, so I like to think that I'm more fortunate, but I also get my shed of problems once they push down the new builds on me. Right now it seems that my new laptop has problems accepting Remote Desktop connections. I upgraded it from Home to Pro only a few weeks ago and did a clean install. Yet I can't use one of the major benefits of Pro edition. All my other PCs with Pro work fine, but they are not on the 1607 version. Anyway... Thanks for the update!
    – Samir
    Sep 19, 2016 at 21:58
  • Latest version (from 2011) still works on Windows 10
    – kapex
    May 30, 2018 at 8:50
2

The above solution can be done without manually editing the registry. Someone has already done the script for us.

http://www.sevenforums.com/tutorials/134840-open-command-window-here-add-remove-shift-right-click.html

Note that before running any reg file, view it to make sure it is safe.

2
  • 1
    THIS should be accepted answer.
    – Bruno Gelb
    Jul 14, 2014 at 17:18
  • 1
    Hi Jus12, can you please edit your answer to include the information from the link? Thanks Jul 29, 2015 at 18:05
1

Other answers have covered the steps, but the import of a REG file can also accomplish this:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-

[HKEY_CLASSES_ROOT\Drive\Background\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-

[HKEY_CLASSES_ROOT\Drive\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-

The ShowBasedOnVelocityId and HideBasedOnVelocityId values exist because Windows is trying to force PowerShell over the regular Command Prompt by inserting these values into these keys and the similar \PowerShell keys.

But, before you do this, you will have to ensure that your account has permission to the Registry keys in question since after every major Windows Update the TrustedInstaller account likes to take control of the settings it changes. I generally set the owners of the [HKCR\Directory] and [HKCR\Drive] keys and all subkeys to the Administrators group, then force inheritance of the permissions which grant Administrators full access to all of the subkeys.

0

With Windows 10 version 1607, the security of the keys must be changed in order to be able to change/delete the value (source):

  • Right-click the key "cmd" in the tree
  • Select Permissions...

    enter image description here

  • Click the Advanced button

    enter image description here

  • Change the owner to the current user

You must log in to answer this question.

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