Restoring "Open Cmd" Instead of "Open PowerShell" in Windows 10 File Explorer
Windows 10 introduced a new feature where right-clicking on a folder or drive in File Explorer would open a PowerShell window instead of the Command Prompt. While PowerShell is a powerful tool, some users may prefer to use the Command Prompt for certain tasks. This article will guide you through the process of restoring the "Open Cmd" option in Windows 10 File Explorer.
Key Concepts
- File Explorer context menu
- PowerShell
- Command Prompt
- Registry editing
Changing the Default Context Menu Option
To change the default context menu option from PowerShell to Command Prompt, you will need to edit the Windows Registry. Follow these steps:
- Press Win + R to open the Run dialog box.
- Type
regeditand press Enter to open the Registry Editor. - Navigate to the following key:
HKEY\_CLASSES\_ROOT\Directory\shellIf the
cmdkey does not exist, you will need to create it by right-clicking on theshellkey, selectingNew>Key, and naming itcmd. - Right-click on the
cmdkey and selectNew>Key. Name the new keycommand. - In the
commandkey, double-click on the(Default)value and change the value data to:cmd.exe /k pushd "%V"This will open a Command Prompt window and change the current directory to the selected folder or drive.
- Click OK to save the changes.
- Close the Registry Editor.
Testing the Changes
To test the changes, open File Explorer and right-click on a folder or drive. You should now see the "Open Cmd" option in the context menu. Clicking on it will open a Command Prompt window in the selected folder or drive.
- Editing the Windows Registry can change the default context menu option from PowerShell to Command Prompt in Windows 10 File Explorer.
- The
cmdkey and thecommandsubkey need to be created or modified in theHKEY\_CLASSES\_ROOT\Directory\shellkey. - The
(Default)value in thecommandkey should be set tocmd.exe /k pushd "%V"to open a Command Prompt window and change the current directory to the selected folder or drive.
References
-
Type: Article
Title: How to Replace PowerShell with Command Prompt in the Right-Click Menu
Author: Brad Chacos
Publication: PCWorld
Date: October 14, 2016
-
Type: Article
Title: How to Replace PowerShell with Command Prompt in Windows 10
Author: Matt Smith
Publication: How-To Geek
Date: July 28, 2020
URL: https://www.howtogeek.com/449612/how-to-replace-powershell-with-command-prompt-in-windows-10/