How do I change "Open with Powershell" to "Open with Command Prompt" when shift-rightclicking in Explorer?
Open regedit.exe, go to HKEY_CLASSES_ROOT\Directory\shell\cmd
, take ownership of the key, add your user account full permissions and change the name of the DWORD from HideBasedOnVelocityId
to ShowBasedOnVelocityId
to enable the command prompt entry again.
Or apply Andrew Richards tweak to have both shown (cmd and PowerShell, also with entry to have elevate (running as admin) version),
by importing his .reg file (create a new txt file, paste the content and rename the file extension to reg):
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"=""
As a quick alternative to the other answers, you can type cmd
on the address bar of Explorer to open a command prompt cd
'd to the current directory. (If you are more of a keyboard person, you can use the Ctrl + L
shortcut to focus the address bar and then type cmd
.)
This works for powershell
too.
This is extremely easy to accomplish
- In the Taskbar and Start Menu Properties window, go to the Navigation tab and uncheck the Replace Command Prompt with Windows PowerShell option.
- Click Apply for the change to take effect.
Sources:
Replace Command Prompt With PowerShell On Power User Menu In Windows 10
Show Command Prompt or PowerShell in Win+X Power User Tasks Menu in Windows 10
Additional Source:
- Microsoft Replaces Command Prompt With PowerShell As Windows 10 Default Shell