Advertisement

Add Command Prompt to Context Menu in Windows 10 Creators Update

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.

Earlier, Microsoft has removed the command prompt entries from the Win + X menu in Windows 10 Creators Update. See Add Command Prompt back to Win+X Menu in Windows 10 Creators Update.

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.

Advertisеment

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.

 

  1. Open Registry Editor.
  2. Go to the following Registry key:
    HKEY_CLASSES_ROOT\Directory\shell\cmd

    Tip: How to jump to the desired registry key with one click.

  3. Take ownership of this key to modify its permissions.
  4. Add "Full control" to permissions of Administrators:
  5. Rename the DWORD value HideBasedOnVelocityId as shown below:
  6. The command prompt context menu item will re-appear in the context menu:
  7. 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.

Download Registry Files

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. You can get Winaero Tweaker here: Download Winaero Tweaker.

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:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisеment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

16 thoughts on “Add Command Prompt to Context Menu in Windows 10 Creators Update”

  1. 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

    1. Win+X menu is NOT the context menu in File Explorer!
      Have you even read this article before commenting it?

  2. 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.”

    1. 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\""

    1. strange, because it was reported by a number of users as a working solution.
      I even added “Nodefault” to the upcoming tweaker version.

  3. 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?

    1. 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\""

  4. 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

  5. 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?

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.