[Windows 10 Tip] Restore “Open Command Window Here” Option in SHIFT+Right-Click Menu

In newer Windows 10 versions, Microsoft has replaced “Command Prompt” option with “PowerShell” in almost every place. For example, Command Prompt has been replaced by PowerShell in following 3 important locations:

  • Win+X Menu
  • Windows Explorer (This PC)’s File menu
  • Shift+right-click on Desktop, directories and drives

We can restore Command Prompt in Win+X menu using Taskbar settings as mentioned in following tutorial:

[Tip] Restore Command Prompt Shortcut in Win+X Menu in Windows 10

Advertisement

I haven’t found any way to restore Command Prompt in File Explorer’s File menu yet.

If we talk about Shift+right-click menu, in previous Windows versions when we pressed SHIFT key and right-clicked on a drive, folder or on Desktop, it used to show “Open Command Window Here” option in the context menu. Now in newer Windows 10 versions, this option has been replaced by “Open PowerShell Window Here” option as shown in following screenshots:

Desktop:

Open_PowerShell_Window_Here_Option_Desktop_Context_Menu.png

Drives:

Open_PowerShell_Window_Here_Option_Drive_Context_Menu.png

Directories:

Advertisement

Open_PowerShell_Window_Here_Option_Directory_Context_Menu.png

BONUS TIP: When you are working in a folder/drive in Windows Explorer, you can click in the addressbar and type cmd and press Enter to quickly open a Command Prompt window at that location.

Today in this topic, we’ll tell you how to restore “Open Command Window Here” option in Shift+right-click menu in Windows 10.

Actually the “Open command window here” option is shown by a registry key which is stored at following locations in Registry Editor:

HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
HKEY_CLASSES_ROOT\Directory\shell\cmd
HKEY_CLASSES_ROOT\Drive\shell\cmd

What Microsoft has done in newer Windows 10 versions, they have used a new DWORD called HideBasedOnVelocityId to forcefully hide the “Open command window here” option when you Shift+right-click in File Explorer. The value of this DWORD is set to 639bc8 which tells Windows to hide the option in the context menu.

HideBasedOnVelocityID_DWORD_Registry_Windows_10.png

Similarly Microsoft is also using a new DWORD ShowBasedOnVelocityId to show “Open PowerShell window here” option in the context menu. Its value is also set to 639bc8 in the registry.

To restore “Open command window here” option in context menu, we just need to rename or delete “HideBasedOnVelocityId” DWORD present in right-side pane of above mentioned registry keys in Registry Editor. But these registry keys are write-protected and we can’t make changes to these keys until we take ownership and full control/permission on these keys.

You can take ownership and full control of these 3 keys using this tutorial and then rename or delete “HideBasedOnVelocityId” DWORD from these keys. It’ll immediately restore “Open command window here” option in Shift+context menu.

If you are not comfortable with modifying registry, here is another solution to add “Open command window here” option in Shift+right-click menu!

We have created a ready-made registry script which will automatically add “Open command window here” option in Shift+right-click menu of Desktop, drives and directories. We have simply modified the default registry keys responsible to show “Open command window here” option and removed the problematic “HideBasedOnVelocityId” DWORD.

You just need to download following ZIP file, extract it using 7-Zip or any other file archive utility and you’ll get .REG file to add “Open command window here” option:

When you run the registry script, it’ll ask for confirmation, accept it and it’ll immediately add the option in the context menu as shown in following screenshots:

“Open Command Window Here” Option in Desktop Context Menu:

Open_Command_Window_Here_Option_Desktop_Context_Menu.png

“Open Command Window Here” Option in Directory Context Menu:

Open_Command_Window_Here_Option_Directory_Context_Menu.png

“Open Command Window Here” Option in Drive Context Menu:

Open_Command_Window_Here_Option_Drive_Context_Menu.png

The ZIP file also contains another registry script to remove the “Open command window here” option from context menu to restore default settings.

BONUS TIP: If you want to remove “Open PowerShell window here” option from context menu, take ownership of following keys in Registry Editor:

HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell
HKEY_CLASSES_ROOT\Directory\shell\Powershell
HKEY_CLASSES_ROOT\Drive\shell\Powershell

And rename ShowBasedOnVelocityId DWORD to HideBasedOnVelocityId in right-side pane. It’ll hide the “Open PowerShell window here” option from Shift+right-click menu.

Also Check:

[Windows 10 Tip] Remove “Open Linux Shell Here” Option from Folder Context Menu

Published in: Windows 10

About the author: Vishal Gupta (also known as VG) has been awarded with Microsoft MVP (Most Valuable Professional) award. He holds Masters degree in Computer Applications (MCA). He has written several tech articles for popular newspapers and magazines and has also appeared in tech shows on various TV channels.

Comments

NOTE: Older comments have been removed to reduce database overhead.

  1. Hey VG,

    Any luck yet on restoring the command prompt to Explorer’s File menu?

    Thanks for the .reg file for restoring cmd to the context menu! At least we have that. 🙂

  2. Vishal – I think having the second option as a zip download would be very beneficial as well. Thanks!

  3. I did this and FAILED to get that “open command window here” in my context menu (nothing is there). What should I do now?

  4. I REALLY APPRECIATE THIS! I was having a very hard time with my pc till I come up with this. Thank you very much. God bless you!

Leave a Comment

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

NOTE: Your comment may not appear immediately. It'll become visible once we approve it.