How can I access the "Open command window here" option in Windows without holding shift?

26

10

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?

Jonathan

Posted 2011-02-01T07:09:33.837

Reputation: 3 371

Answers

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

Windos

Posted 2011-02-01T07:09:33.837

Reputation: 10 080

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. – T. Kaltnekar – 2011-02-01T10:17:16.427

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 – 2011-02-01T10:34:14.560

So can you add entries to the hidden list by adding that registry entry? – paradroid – 2011-02-01T11:43:59.367

@paradroid: I believe that's the case, yes. – afrazier – 2011-02-01T13:57:23.090

@paradroid: I don't see why not. I might play around with it a work if there is a lull. – Windos – 2011-02-01T17:37:51.053

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.

Colonel Panic

Posted 2011-02-01T07:09:33.837

Reputation: 9 529

4+1 for covering HKEY_CLASSES_ROOT\Directory\Background\shell\cmd – trlkly – 2014-10-21T10:43:01.257

1I had to this again after installing Windows 10 'anniversary update' – Colonel Panic – 2016-08-05T12:03:55.837

"Error deleting values: Unable to delete all specified values." Yours faithfully, Windows 10 Pro, version 1607 – Samir – 2016-09-19T16:43:05.543

Windows 10 'creators update' just undid this again for me – Colonel Panic – 2017-04-30T20:50:14.057

9

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).

afrazier

Posted 2011-02-01T07:09:33.837

Reputation: 21 316

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 – 2016-09-19T16:51:02.757

@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 – 2016-09-19T17:58:18.247

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 – 2016-09-19T21:58:01.587

Latest version (from 2011) still works on Windows 10 – kapex – 2018-05-30T08:50:55.197

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.

palswim

Posted 2011-02-01T07:09:33.837

Reputation: 2 793

1

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.

Jus12

Posted 2011-02-01T07:09:33.837

Reputation: 720

THIS should be accepted answer. – Bruno Gelb – 2014-07-14T17:18:31.903

1Hi Jus12, can you please [edit] your answer to include the information from the link? Thanks – Canadian Luke – 2015-07-29T18:05:24.463

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

Stefan

Posted 2011-02-01T07:09:33.837

Reputation: 1