Microsoft has replaced the ‘Open command window here’ context menu option with the ‘Open PowerShell window here’ context menu with the Windows 10 Creators Update. According to Microsoft, this change is made with the intention to bring the best command line experience to all the power users. And hence, PowerShell has become the default command shell on Windows.
Here’s what Microsoft had to say about this:
It (PowerShell) replaces Command Prompt (aka, “cmd.exe”) in the WIN + X menu, in File Explorer’s File menu, and in the context menu that appears when you shift-right-click the whitespace in File Explorer. Typing “cmd” (or “powershell”) in File Explorer’s address bar will remain a quick way to launch the command shell at that location. For those who prefer to use Command Prompt, you can opt out of the WIN + X change by opening Settings > Personalization > Taskbar, and turning “Replace Command Prompt with Windows PowerShell in the menu when I right-click the Start button or press Windows key+X” to “Off”.
You might want to check out the 14971 Preview Build announcement post, if you want to get more insights on this change.
Windows PowerShell is a great tool, no doubt. But it might take some time for some folks to get completely familiar with PowerShell. You could do everything you did in command prompt in PowerShell as well. But there might a few slight changes here and there. For example, you may need to suffix certain commands with “.exe” before running them in PowerShell.
That said, it does not mean that you can never have the option back. In fact, it is easier than you might think to get back the ‘Open command window here’ context menu back. And here’s how to do it:
Copy the following code to Notepad and save it with a .REG extension. For example, something like cmdmenu.reg. Once you save the file, simply double-click the file to apply the registry settings.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryshellcmdprompt] @="@shell32.dll,-8506" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDirectoryshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdprompt] @="@shell32.dll,-8506" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOTDriveshellcmdprompt] @="@shell32.dll,-8506" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDriveshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V""
Too much work to copy/paste? No worries, you can directly download the REG file here: CMD-Menu-Windows-10.zip
The above zip file contains two REG files:
- CMD-Menu-Windows-10.reg – To add the ‘Open command window here’ context menu option.
- Remove-CMD-Menu-Windows-10.reg – To remove the ‘Open command window here’ context menu option.
Once you double-click on the REG file, you will be prompted like below:
Tap on ‘Yes’ and the key will be added to you registry and you should now have the ‘Open command window here’ option on your Windows 10.