Starting with Windows 10 build 14986, Microsoft enabled PowerShell by default in the context menu in File Explorer. The good old command "Open command window here" was removed. You can get the command prompt back in the context menu of File Explorer in Windows 10 Creators Update with a simple Registry tweak.
It is not clear what Microsoft's plan is regarding cmd.exe's future. Quite possible the Redmond giant is going to merge the cmd.exe functionality with PowerShell and leave its executable file just for compatibility reasons. Let's see how add Command Prompt back to the context menu in Windows 10 Creators Update.
Add Command Prompt to Context Menu in Windows 10 Creators Update
Method 1. Modify the a DWORD value for the existing key
Do the following.
- Open Registry Editor.
- Go to the following Registry key:
HKEY_CLASSES_ROOT\Directory\shell\cmd
Tip: How to jump to the desired registry key with one click.
- Take ownership of this key to modify its permissions.
- Add "Full control" to permissions of Administrators:
- Rename the DWORD value HideBasedOnVelocityId as shown below:
- The command prompt context menu item will re-appear in the context menu:
- Now, repeat steps above under the following key:
HKEY_CLASSES_ROOT\Drive\shell\cmd
I tested this tweak in Windows 10 build 14986 and it worked as expected. If it doesn't work for you, see Method 2.
Method 2. Re-create the context menu entry
Save the following Registry tweak as a *.REG file and double click it to apply. It replicates the default command prompt context menu entry.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Drive\shell\cmd2] @="Open command window here" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Drive\shell\cmd2\command] @="cmd.exe /s /k pushd \"%V\"" [HKEY_CLASSES_ROOT\Directory\shell\cmd2] @="Open command window here" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Directory\shell\cmd2\command] @="cmd.exe /s /k pushd \"%V\"" [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd2] @="Open command window here" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd2\command] @="cmd.exe /s /k pushd \"%V\""
You can replace the portion "Open command window here" with any text you want.
You can remove the "Extended" line from the tweak to make the context menu command always visible. It won't require to hold the Shift key to access the command.
To save your time, I made ready-to-use Registry files. One of them contains the tweak above, the other one is the undo file.
Finally, you can use Winaero Tweaker. Go to Context menu - Add Command Prompt to Context Menu and tick the option. You can name the context menu item as you wish and make it visible only in the extended context menu.
That's it.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Thanks a lot.but i want to add cmd (admin mode) context menu..so what should i have to modify for doing that.
In fact it’s much simpler than what has been posted and I found it on youtube. You only have to go to windows’ settings, personalization, taskbar, and last step is to toggle the switch (somewhere in the middle of the list) where it states: “replace command prompt with windows powershell in the menu when I right-click the start button or press windows logo key + x”.
Credits should go to: logesh waran on youtube
Win+X menu is NOT the context menu in File Explorer!
Have you even read this article before commenting it?
If you use StartIsBack after using this tweak you will not be able to open the folders: Videos, Documents, Images, Music from the Start menu, and when you try to open the above mentioned folders you will get a command window with the error: “The system cannot find the drive specified.”
Add “Nodefault” to resolve this issue.
The example tweak looks as follows:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Drive\shell\cmd2]
@="Open command window here"
"Extended"=""
"Nodefault"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\cmd2\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\cmd2]
@="Open command window here"
"Extended"=""
"Nodefault"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\cmd2\command]
@="cmd.exe /s /k pushd \"%V\""
Thanks for the info. I’ll definitely try your fix.
Unfortunately your solution didn’t helped me. The problem remained.
strange, because it was reported by a number of users as a working solution.
I even added “Nodefault” to the upcoming tweaker version.
meybe this solution didn’t work when using other language windows …?
PS not work me too
when unchecked “Show only in Shift + Right click(extended) menu.”
Hi, your fix worked when you right click ON a folder. But it doesn’t work when you click the background when you are already in the folder you want (this used to work).
Do you have any idea how to fix that?
Good find. We need this:
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd2]
@="Open command window here"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd2\command]
@="cmd.exe /s /k pushd \"%V\""
Winaero Tweaker is really GREAT! Thank you :D
You are welcome.
The following reg file does not require admin privileges, should survive any OS upgrades and is IMHO the cleanest solution (it simply unhides the entry for the current user):
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\cmd]
“HideBasedOnVelocityId”=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\cmd]
“HideBasedOnVelocityId”=dword:00000000
I’m not sure I understood the reason to do that. If I want to open cmd from a location I just click in the address (path) bar of the window, type CMD and press Enter. Isn’t it fine?