Skip to main content

How to return the 'Open command window here' option to Windows 10's context menu

On Windows 10, Microsoft continues to fade out Command Prompt in favor of PowerShell. Although you can still use the console, you'll notice that the option is no longer available on the Power User menu (Windows key + X), on the File menu for File Explorer, or in the extended context menu (Shift + Right-click).

While there is an option in the Settings app to add Command Prompt to the Power User menu, you won't find an option to bring it back to the extended context menu. However, it's still possible to re-incorporate the option in Windows 10, if you're comfortable modifying the Registry.

In this Windows 10 guide, we walk you through the steps to bring back the "Open command window here" option to the context menu.

How to add 'Open command window here' to the context menu

Adding the "Open command window here" to the extended-folder context menu is a two-step process. First, you need to bring back the option when you open the menu when right-clicking a folder, and second, using similar steps, you need to return the option when right-clicking the background of a folder.

Adding 'Open command window here' to the folder context menu

In order to re-incorporate the option to launch Command Prompt on the extended context menu, you'll need to modify the Registry using the following steps:

Warning: This is a friendly reminder that editing the registry is risky, and it can cause irreversible damage to your installation if you don't do it correctly. We recommend making a full backup of your PC before proceeding.

If you're ready, follow these steps:

  1. Use the Windows key + R keyboard shortcut to open the Run command.
  2. Type regedit, and click OK to open the Registry.
  3. Browse the following path:HKEY_CLASSES_ROOT\Directory\shell\cmd
  4. Right-click the cmd (folder) key, and click Permissions.

  1. Click the Advanced button.

  1. On "Advanced Security Settings," click the Change link next to "Owner."

  1. Type your account name in the provided field, click Check Names to verify you're typing the account name correctly, and click OK.

  1. Check the Replace owner on subcontainers and objects option.

  1. Click Apply.
  2. Click OK.
  3. On "Permissions," select the Administrators group.
  4. Under "Permissions for Administrators," select Allow for the Full Control option.

  1. Click Apply.
  2. Click OK.
  3. Inside the cmd (folder) key, right-click the HideBasedOnVelocityId DWORD, and click Rename.
  4. Change the DWORD name from HideBasedOnVelocityId to ShowBasedOnVelocityId, and press Enter.

Once you complete these steps, using the Shift + Right-click combo on a folder will display the "Open command window here" option.

At any time, you can revert the changes following the same instructions, but on step No. 16, make sure to rename the DWORD from from ShowBasedOnVelocityId to HideBasedOnVelocityId, and press Enter.

Adding 'Open command window here' to the background context menu

The instructions mentioned above add the option to open Command Prompt on the folder context menu, but not when you Shift + right-click the background of the folder that is currently open.

If you want to Shift + right-click a background to open the location using Command Prompt, you need to follow these extra steps:

  1. Use the Windows key + R keyboard shortcut to open the Run command.
  2. Type regedit, and click OK to open the Registry.
  3. Browse the following path:HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
  4. Right-click the cmd (folder) key, and click Permissions.

  1. Click the Advanced button.

  1. On "Advanced Security Settings," click the Change link next to "Owner."

  1. Type your account name in the provided field, click Check Names to verify you're typing the account name correctly, and click OK.

  1. Check the Replace owner on subcontainers and objects option.

  1. Click Apply.
  2. Click OK.
  3. On "Permissions," select the Administrators group.
  4. Under "Permissions for Administrators," select Allow for the Full Control option.

  1. Click Apply.
  2. Click OK.
  3. Inside the cmd (folder) key, right-click the HideBasedOnVelocityId DWORD, and click Rename.
  4. Change the DWORD name from HideBasedOnVelocityId to ShowBasedOnVelocityId, and press Enter.

Once you complete these steps, when using the Shift + right-click combo on a folder background you will see the "Open command window here" option.

You can revert the changes following the same instructions, but on step No. 16, make sure to rename the DWORD from from ShowBasedOnVelocityId to HideBasedOnVelocityId, and press Enter.

Thanks @johannesmp (Windows Central reader) for this part of the tip!

How to remove 'Open PowerShell window here' from the context menu

You'll also notice that using the above steps will bring back the "Open command window here," but it'll keep the "Open PowerShell window here" too.

If you want to remove the PowerShell entry from the extended context menu, do the following:

  1. Use the Windows key + R keyboard shortcut to open the Run command.
  2. Type regedit, and click OK to open the Registry.
  3. Browse the following path:HKEY_CLASSES_ROOT\Directory\shell\PowerShell
  4. Right-click the PowerShell (folder) key, and click Permissions.

  1. Click the Advanced button.

  1. On "Advanced Security Settings," click the Change link next to "Owner".

  1. Type your account name in the provided field, click Check Names to verify you're typing the account name correctly, and click OK.

  1. Check the Replace owner on subcontainers and objects option.

  1. Click Apply.
  2. Click OK.
  3. On "Permissions," select the Administrators group.
  4. Under "Permissions for Administrators," select Allow for the Full Control option.

  1. Click Apply.
  2. Click OK.
  3. Inside the PowerShell (folder) key, right-click the ShowBasedOnVelocityId DWORD, and click Rename.
  4. Change the DWORD name from ShowBasedOnVelocityId to HideBasedOnVelocityId, and press Enter.

After completing these steps, using Shift + Right-click will only show the "Open command window here" option.

To bring back the PowerShell option, follow the same instructions, but on step No. 16, make sure to rename the DWORD from HideBasedOnVelocityId to ShowBasedOnVelocityId, and press Enter.

Wrapping things up

While you can run the majority of the commands using PowerShell, a lot of people still prefer Command Prompt, and the context menu option provides a quick way to open the utility in a specific location without having to type a long command to navigate to a folder path. But now, thanks to a hidden option in the Registry, you can bring that experience back to Windows 10.

More Windows 10 resources

For more help articles, coverage, and answers to common questions about Windows 10, visit the following resources:

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

24 Comments
  • You can run any old command in powershell plus everything powershell brings. Embrace it.
  • PowerShell takes too long to open and be ready for us to type. Command Prompt is super fast. I will stick to Command Prompt until that is fixed.
  • Idk what you're talking about. It's instantaneous for me.
  • Some stuff doesn't display the output correctly.  Tree for example.  PowerShell mangles the ASCII characters that build the tree. 
  • @CX1, I like PowerShell and respect that it's superior in terms of power and flexibility, but some things are definitely easier to still do in Command Prompt, like batch renames with wildcards. Also, and I feel stupid for admitting this, because there's probably a straightforward way to do it using PS scripts, but I find it much faster and easier to save a new .BAT or .CMD file to run simple multi-step commands than get past the security challenges of running a PS file. If there's a quick and easy way to save a PS script as a text file and just run it without needing to either turn off the security or key it and register the key with the OS, that would go a long way to completing my transition away from the old Command Prompt, but I'm not aware of any way to do that yet. (Happy to be told I'm wrong and reeducated on this).
  • I don't think any of us would be here if it worked. I changed it back to the Command Prompt.
  • It's also worth pointing folks to this article as well: How to return Command Prompt to the Power User menu in Windows 10 Creators Update https://www.windowscentral.com/how-add-command-prompt-power-user-menu-wi...
  • Isn't it just simplest to enter "cmd" in a PowerShell window?
  • Sure, if you are ok with a long wait.
  • It doesn't work if you use it from network folder (cmd will go back to C:).
  • Did not know about this! Thank you so much - I was sick of having to copy path of a folder and "cd" every time (cause they removed Open in Command Prompt in favor of PS in the ribbon menu).
  • It has issues displaying nodejs, npm and angular. Sometimes it won't even finish the command because it freezes in PowerShell.
  • Funny as adb doesn't seem to work very well in power shell. This fix rocks and will save me some time.
  • I would also like to replace PowerShell with Command Prompt in the file menu of the folder window. I tried searching for it in registry but could not find it. Hope someone will find it.
  • Or you can just replace the address in the address bar with CMD or POWERSHELL and press enter.
  • Interesting.
  • Where tf are these shortcuts coming from lol. How did I not know about any of this. Thank you!
  • I learned those here at Windows Central in the past few months myself. I was amazed that I had never heard of those before.
  • it is also a "web search" box as long as you use more than one word. The interesting bit here is that is uses your defaut browser but with the default search engine of internet explorer (which is changeable anyway).
  • Cool, that's a new shortcut to me. Doesn't work for network drives, though.
  • Hi All,
    I followed the above steps for "Adding 'Open command window here' to the folder context menu".
    All went well until I got to step:
    15) Inside the PowerShell (folder) key, right-click the ShowBasedOnVelocityId DWORD, and click Rename.
    When I tried to rename it to HideBasedOnVelocityId, I got the following error message:
    The Registry Editor cannot rename HideBasedOnVelocityId. Error while renaming value.
    Then I tried the same steps again, but this time ran Regedit as administrator. Same Result.
    Can anyone tell me what I'm missing? What went wrong?
    Kind Regards,
    Kellog
  • DID YOU GIVE PERMITIONS ?
  • For those who want to Open command windows as an Administrator Follow my step:  1-Browse the following path: HKEY_CLASSES_ROOT\Directory\Background\shell\cmd HKEY_CLASSES_ROOT\Directory\shell\cmd\command 2- Add permission to the path as shown above  3-Modify inside the data (Default) from "cmd -Args '/s /k pushd %V" To
    powershell -Command "Start-Process cmd -Args '/s /k pushd %V' -Verb RunAs" That's it... (PS: You can do the same steps to the path: HKEY_CLASSES_ROOT\Directory\bakground\shell\cmd\command)
  • I wasn't able to get this to restore cmd prompt to the inside folder. I followed all of the steps for part 1 and part 2. I get the "open command window here" on the outside folder but not inside. What am I doing wrong?