How to Add “Open command window here” in Windows 11

In Windows 11, the context menu “Open Command window here” doesn’t exist by default. Instead, you’ll see the “Open in Windows Terminal” and “Open PowerShell window here” (when you press Shift + right-click) options in the folder context menu.

This article tells you how to add “Open Command window here” (in Windows 11) to open a Command Prompt window in that directory path.

“Open command window here” in Windows 11

Option 1: Add “Open command window here”

Using a registry edit, you can add the traditional “Open Command window here” option back in the context menu for file system folders (directories) and drives.

  1. Open Notepad.
  2. Copy the following lines and paste them in Notepad:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Directory\shell\cmdprompt]
    @="@shell32.dll,-8506"
    "NoWorkingDirectory"=""
    
    [HKEY_CLASSES_ROOT\Directory\shell\cmdprompt\command]
    @="cmd.exe /s /k pushd \"%V\""
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\cmdprompt]
    @="@shell32.dll,-8506"
    "NoWorkingDirectory"=""
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\cmdprompt\command]
    @="cmd.exe /s /k pushd \"%V\""
    
    [HKEY_CLASSES_ROOT\Drive\shell\cmdprompt]
    @="@shell32.dll,-8506"
    "NoWorkingDirectory"=""
    
    [HKEY_CLASSES_ROOT\Drive\shell\cmdprompt\command]
    @="cmd.exe /s /k pushd \"%V\""
    
  3. Save the file as “cmdhere.reg
  4. Double-click the file to apply the settings to the registry.

Alternately, you can download the pre-made registry file below:

This adds the “Open command window here” option to the right-click menu for folders and drives, which, when clicked, opens a Command Prompt window at the current drive or directory path.

open command window here in windows 11


Option 2: Launch Command Prompt via Windows Terminal

As you have noticed, the “Open in Windows Terminal” context menu entry appears when you right-click on a folder in Windows 11. This option launches the Windows Terminal app, a tabbed user interface where-in you can open multiple PowerShell or Command Prompt profiles.

open command window here in windows 11 - windows terminal default

By default, clicking on the “Open in Windows Terminal” context menu option launches PowerShell (the default profile). All you need to do is change the default profile to Command Prompt.

open command window here in windows 11 - windows terminal default

To do so, click on the chevron at the top.

(As a side note, you can see that this dialog allows you to open various console windows such as PowerShell, Command Prompt, and Azure Cloud Shell.)

Click Settings.

open command window here in windows 11 - windows terminal default

Under “Startup,” in the “Default profile” drop-down list box, select Command Prompt.

open command window here in windows 11 - windows terminal default

Save the settings by clicking on the Save button at the bottom.

Close all tabs and the terminal window.

Right-click on a folder or drive, and click “Open in Windows Terminal.” This should launch the Command Prompt tab (profile) using the Windows Terminal app.

tips bulb iconNote: The “Open in Windows Terminal” option doesn’t appear for Drives.

Additional Note: Win+X Power User menu

Note that the above Terminal setting also changes the default profile (PowerShell vs. Command Prompt) used when you open Windows Terminal and Windows Terminal (Admin) via the Power User (Win + X) menu.

(The Power user menu is the menu that appears when you right-click on the Start button.)

windows terminal option in win+x start context menu

(For a Windows 10 version of the article, check out Add “Open command window here” to Context Menu in Windows 10. Of course, all of the registry methods mentioned on that page work fine in Windows 11 as well.)

Tested on Windows 11 21H2 OS Build 22000.194. This article was written on 10-October-2021.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment