How-To

How to Add the Open command window here Option Back to the Windows Right-Click Menu

Before the Windows 10 Creators Update, the context menu had an option called Open command window here that was available when you pressed Shift + right-click on a folder. Unfortunately, Microsoft wants everyone to use PowerShell instead of the Command Prompt. So, in the Creators Update, they changed the Open command window here option to Open PowerShell window here on the folder context menu. They also changed the Command Prompt options on the Power User Menu (Windows key + X) to PowerShell. But we already showed you how to switch that back.

Today I’ll show you how to add the Open command window here option back to the folder right-click menu and to the right-click menu when you’re in a folder. This doesn’t have to replace the Open PowerShell window here option. You can have both if you want. But you can also hide the PowerShell option if you don’t want it, and we’ll show you how to do that, too.

What You Should Do Before Editing the Registry

To make the changes we talk about here, you must make changes to the registry.

The Registry Editor is a powerful tool that can render your system unstable or even inoperable if misused. This is a fairly simple change, and if you follow our instructions, you shouldn’t have any problems. But make sure you back up the Registry and back up your computer before making changes.

You should also make a System Restore point before continuing so if something goes wrong, you can always roll back.

Add the “Open command window here” Option to the folder context menu

To add the Open command window here option to the context menu that displays when you right-click on a folder, press Windows key + R to open the Run dialog box.

Then, type: regedit into the Open box and click OK.

If the User Account Control dialog box displays, click Yes to continue. You may not see this dialog box, depending on your User Account Control settings.

Open the Registry Editor in Windows 10

Navigate to the following registry key. You can copy the full path below, paste it into the box just under the menu bar, and press Enter to get to the key quickly.

HKEY_CLASSES_ROOT\Directory\shell\cmd

Take ownership of the cmd key and give yourself full control permission.

Select Permissions for a key in the Windows Registry Editor

Make sure the cmd key is selected. Then, right-click on the HideBasedOnVelocityId value on the right and select Rename.

Select Rename for the HideBasedOnVelocityId value in the Windows Registry Editor

Change the name of the HideBasedOnVelocityId value to ShowBasedOnVelocityId and press Enter.

Rename the HideBasedOnVelocityId value to ShowBasedOnVelocityId in the Windows Registry Editor

Close the Registry Editor and restart the Windows Explorer process.

Restart the Windows Explorer process

Now you can Shift + right-click on a folder, not in it, and select Open command window here.

Notice that the Open PowerShell window here option is still there. If you’re not going to use that option, see the next section to hide it.

Open command window here option added to right-click menu in Windows File Explorer

Hide the “Open PowerShell window here” Option

If you want to hide the Open PowerShell window here option, go to the following path in the Registry Editor:

HKEY_CLASSES_ROOT\Directory\shell\Powershell

Then, take ownership of the Powershell key and give yourself full control permission

Select Permissions for the Powershell key in the Windows Registry Editor

Right-click on the ShowBasedOnVelocityId value, select Rename, and change the name to HideBasedOnVelocityId.

Close the Registry Editor and restart the Windows Explorer process.

The Open PowerShell window here option is removed from the right-click menu in File Explorer.

Rename ShowBasedOnVelocityId key in Windows Registry Editor

Add the “Open command window here” Option to the Context Menu in an Open Folder

So far, we’ve explained how to add the Open command window here option to the context menu when you Shift + right-click on a folder, but not in a currently open folder.

You can also enable the Open command window here option on the right-click menu in an open folder.

Open the registry editor as we showed you earlier and go to the following key.

HKEY_CLASSES_ROOT\Directory\Background\shell\cmd

Take ownership of the cmd key and give yourself full control permission.

Make sure the cmd key is selected. In a blank area of the right pane, right-click the HideBasedOnVelocityId value, and click Rename.

Then, change the name to ShowBasedOnVelocityId.

Close the Registry Editor and restart the Windows Explorer process.

Rename Background cmd HideBasedOnVelocityId value in the Windows Registry Editor

Now you can be in a folder, Shift + right-click in the right pane of File Explorer, and select Open command window here.

The Open command window here option added to the context menu in a folder in Windows File Explorer

Revert Your Changes

To revert your changes, follow the same instructions listed here, but rename the ShowBasedOnVelocityId or HideBasedOnVelocityId value to the other, depending on whether you’re showing or hiding the context menu option.

18 Comments

18 Comments

  1. TonyLe

    February 9, 2008 at 4:45 pm

    Very cool. Didn’t know that even existed. Thanx dude.

  2. windows

    June 8, 2011 at 4:34 am

    you can also do this from Tools –> folder options –> File types –> (None) Folders –> Advanced –> New. Give action name “command prompt” and action as “cmd.exe”

    • Blake Dent

      September 29, 2020 at 8:54 pm

      where would i find tools?

    • JJ

      November 10, 2022 at 9:05 am

      Where do we find the Tools –> folder options –> File types –> (None) Folders –> Advanced –> New that you mention?

    • Jack

      January 12, 2024 at 8:36 am

      I did that on my still running Windows XP Pro 64 desktop a decade ago. No Such option exists on my Windows 10 Pro 64 laptop.

  3. Jim Shunamon

    December 1, 2018 at 2:45 pm

    Linked to this page from an article on doing this in Windows 10. Unfortunately I get the message that you can not install on any version of Windows older or newer than XP. Wants me to try compatibility mode, but that has proven to cause problems for me in the past. :-(

  4. Christopher Chiesa

    May 21, 2020 at 9:15 am

    “Microsoft wants everyone to use PowerShell instead of the Command Prompt. ”

    *SIGH* Yet another example of high-handed arrogance from the a-holes in Redmond.

    PowerShell is a crappy alternative to (let alone replacement for) the Command Prompt. As a professional software developer of thirty-plus years, I find PowerShell enormously (perhaps unnecessarily) more complex than Command Prompt, to such a ridiculous extent that it pretty much requires an education in computer programming, Computer Science, and Windows programming in particular, just to do simple things. Thank God for the detailed Help — though even that is a bit on the impenetrable side, as far as I’m concerned. I have been toying with it, intermittently, for a couple of years now, and, despite decades of creating intricate software of my own (the vast majority of it via simple text-editing and command-lines — no IDEs! GUIs are cute, but NOT FLEXIBLE) have not yet found simple or straightforward ways to do things, in PowerShell, that were trivial — perhaps even single commands! — at the Command Prompt. (To make matters worse, a lot of the things I want to do seem to have no convenient GUI alternatives in e.g. Windows Explorer.) So, I’m not a fan. At the very least, I would like to have seen MS leave Command Prompt on the system (as they did for a long time) for those who Really Don’t Need the high-falutin’ mechanisms of PowerShell, or whom it Just Plain P*sses Off.

    Now, admittedly, I’m a bit of a Luddite — so my friends tell me — in that I actively reject Microsoft’s “end-of-life entire product lines because we don’t feel like continuing to support them because we want to sell billions of people the “latest and greatest” (ah ha ha hahahahaha! *snrk*) versions of all the same pieces (OS, apps, computers, peripherals) OVER AND OVER AND OVER AGAIN” business model, and therefore number myself among the millions of grudge-bearers who still use long (or VERY long) -out-of-lifed versions of Windows. So I don’t know what improvements (GUI alternatives to each and every Command Prompt command, tool, option, flag, etc.) may have been added in later versions — though I’ve tried the newer versions and find them, if anything, just as much too complicated, and difficult to understand, as PowerShell is when compared to Command Prompt.

    Down with Microsoft.

    • Jack

      January 12, 2024 at 9:37 am

      Kudo’s to you Christopher C. for getting your sentiments posted here. I agree with you but mine are much more aggressive and vulgar. I made 3 attempts to reply to the “windows” commenter but kept getting blocked, most likely because of my very un-flattering statements about MS’s philosophy regarding their lack of user friendliness. They do have one, but friendliness is not in their vocabulary.

  5. Chayim

    July 11, 2020 at 1:15 am

    Where is “Tools”?

  6. Chayim

    October 2, 2021 at 1:42 am

    Does not work anymore as of todays Windows version

  7. Roman

    August 10, 2022 at 4:31 pm

    I use free “Winaero tweaker” tool to add command prompt item to the Explorer context menu.

  8. michael christensen

    September 14, 2022 at 4:02 am

    14-sep-2022 – doesnt work.

    • Steve Krause

      September 14, 2022 at 12:52 pm

      Hi Michael,

      You must have done something wrong. I just re-tested the article and it does still work as of September 2022. Windows Version 21H1 (OS Build 19043.2006).

      Did you remember to SHIFT + Right Click? Don’t forget the holding down the SHIFT key.

      Steve

      • michael christensen

        September 14, 2022 at 1:57 pm

        i got it to work after i went to background/shell/cmd and did the same thing there.

  9. L3

    August 20, 2023 at 10:15 pm

    “Unable to save permission changes on cmd”

    “Access is denied”

    This must be simple to get around?

    Thks

  10. Jerry

    December 26, 2023 at 5:10 am

    Hi Steve,

    Cool trick. I can’t remember how I was able to do it in the past, but there was a method back in XP and 7 where you could add a command option that started the cmd prompt in admin mode. Do you know of an option to do that now?

  11. Jerry

    December 26, 2023 at 8:06 am

    Actually, I found the answer on my own. This is actually a bit more useable for me anyway. This adds a CMD sub-menu on the context menu with a normal and run as admin option.

    I know this is on a different site, but cloudflare blocked me when I tried putting the registry entry info up here.

    https://www.tenforums.com/customization/210043-add-cmd-sub-menu-context-menu-run-administrator.html

    • Steve Krause

      December 28, 2023 at 12:30 pm

      All good Jerry. A good reference for our readers (and motivation for us to write that article here on groovyPost.)

      Thnx!

Leave a Reply

Your email address will not be published. Required fields are marked *

 

To Top