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

12,425

Solution 1

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

Solution 2

  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.

Solution 3

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

Solution 4

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.

Solution 5

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.

Share:
12,425

Related videos on Youtube

Jonathan
Author by

Jonathan

Updated on September 17, 2022

Comments

  • Jonathan
    Jonathan almost 2 years

    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?

  • T. Kaltnekar
    T. Kaltnekar over 13 years
    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.
  • Windos
    Windos over 13 years
    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.
  • Naidim
    Naidim over 13 years
    So can you add entries to the hidden list by adding that registry entry?
  • afrazier
    afrazier over 13 years
    @paradroid: I believe that's the case, yes.
  • Windos
    Windos over 13 years
    @paradroid: I don't see why not. I might play around with it a work if there is a lull.
  • Bruno Gelb
    Bruno Gelb almost 10 years
    THIS should be accepted answer.
  • trlkly
    trlkly over 9 years
    +1 for covering HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
  • Canadian Luke
    Canadian Luke almost 9 years
    Hi Jus12, can you please edit your answer to include the information from the link? Thanks
  • Colonel Panic
    Colonel Panic almost 8 years
    I had to this again after installing Windows 10 'anniversary update'
  • Samir
    Samir almost 8 years
    "Error deleting values: Unable to delete all specified values." Yours faithfully, Windows 10 Pro, version 1607
  • Samir
    Samir almost 8 years
    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.
  • afrazier
    afrazier almost 8 years
    @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.)
  • Samir
    Samir almost 8 years
    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!
  • Colonel Panic
    Colonel Panic about 7 years
    Windows 10 'creators update' just undid this again for me
  • kapex
    kapex about 6 years
    Latest version (from 2011) still works on Windows 10