Way to open a folder from Windows Explorer in cmd.exe under Windows 10 with one shortcut?

It does work for Windows 10. There are already many duplicate questions:

  • How do I change "Open with Powershell" to "Open with Command Prompt" when shift-rightclicking in Explorer?
  • How to restore "Open command prompt" in Windows Explorer's File menu on Creators Update?
  • 'Open command window here' does not appear in context menu

Basically just take ownership of the HKEY_CLASSES_ROOT\Directory\shell\cmd key and rename the DWORD HideBasedOnVelocityId to ShowBasedOnVelocityId. For more details read

  • How to restore the “Open command window here” option in Build 14986 and newer
  • Restore “Open Command Window Here” Option in SHIFT+Right-Click Menu
  • Restore Open command window here item to Windows 10 folder context menu
  • How to return the 'Open command window here' option to Windows 10's context menu

You can also get the menu item "Command Prompt Here" without shift key in Windows 10, or add menu items to SHIFT + right click menu on Windows


Alternatively just use Andrew Richards' Enhancing the “Open Command Prompt here” Context Menu experience tweak and have the option to run cmd/powershell/bash... both as normal and elevated rights

run cmd elevated

run powershell elevated

Just import the below *.reg file (or copy from the MSDN blog above)

Windows Registry Editor Version 5.00

; Command Prompt

[HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd]
"MUIVerb"="Command Prompts"
"Icon"="cmd.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"

[HKEY_CLASSES_ROOT\Directory\background\shell\01MenuCmd]
"MUIVerb"="Command Prompts"
"Icon"="cmd.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open]
"MUIVerb"="Command Prompt"
"Icon"="cmd.exe"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas]
"MUIVerb"="Command Prompt Elevated"
"Icon"="cmd.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""


; PowerShell

[HKEY_CLASSES_ROOT\Directory\shell\02MenuPowerShell]
"MUIVerb"="PowerShell Prompts"
"Icon"="powershell.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"

[HKEY_CLASSES_ROOT\Directory\background\shell\02MenuPowerShell]
"MUIVerb"="PowerShell Prompts"
"Icon"="powershell.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open]
"MUIVerb"="PowerShell"
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open\command]
@="powershell.exe -noexit -command Set-Location '%V'"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas]
"MUIVerb"="PowerShell Elevated"
"Icon"="powershell.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas\command]
@="powershell.exe -noexit -command Set-Location '%V'"


; Ensure OS Entries are on the Extended Menu (Shift-Right Click)

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\background\shell\cmd]
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\shell\Powershell]
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\background\shell\Powershell]
"Extended"=""

Press Alt+D to go to the address bar*, or click in it and make sure everything is selected (it should be by default). Alternatively, user phuclv informs us that Ctrl+L also selects the address bar.

Type cmd and press Enter.


You can do the same to get a PowerShell window, just type powershell instead of cmd.


* Microsoft: Keyboard shortcuts in Windows.