The Command Prompt is an incredibly useful way to perform certain tasks. For example, if you want to run a program with special parameters, the Command Prompt is one fast way to do it. The problem is that navigating the directory structure of a modern computer can be a real pain when using Command Prompt. Especially since Windows 10 supports such long folder and program names. 

The good news is that you can open Command Prompt directly from inside a Windows Explorer window. Taking you directly to that folder location!

Table of Contents
    Open Command Prompt in Folder Using Windows Explorer image 1

    Command Prompt vs PowerShell

    One important point about opening the command prompt in a folder, is that we’re referring specifically to the Windows Command Prompt, rather than PowerShell. Although both programs look similar, being a text-command interface, they are actually very different. 

    Command Prompt is a simple, lightweight text interface for Windows. In contrast, PowerShell is a complex, powerful command line tool that lets power users do in-depth system management of the computer, among a long list of other handy abilities.

    Open Command Prompt in Folder Using Windows Explorer image 2

    Command Prompt uses the “CMD.exe” while PowerShell uses “powershell.exe”, so they are entirely separate. Although some of the functionality overlaps, the two programs may use different commands to accomplish the same job. This article is only about the Command Prompt, but some of the shortcuts will also work for PowerShell. We’ll indicate when this is the case.

    Open Command Prompt Using the Explorer Address Bar

    When you open a Windows Explorer folder, you’ll see an address bar similar to that in a web browser. By default, it shows the path of the current folder. You can see it here.

    Open Command Prompt in Folder Using Windows Explorer image 3

    If you click on this address bar, you can type in text. By typing “cmd” and hitting Enter, you’ll open up the command prompt at that location.

    Open Command Prompt in Folder Using Windows Explorer image 4

    This will also work if you type “powershell” instead of “cmd”. Taking you directly to the Windows PowerShell prompt at that folder.

    Adding “Open command window here”

    In early versions of Windows 10, there was a context menu entry called “Open command window here” which would open the Command Prompt in the folder location you specify. For example, if you right-click on a folder and use this command, the Command Prompt starts at the current folder location.

    After the 2017 Creator’s Update for Windows 10, Microsoft removed this option. Why? It’s most likely down to an effort from Microsoft to push people away from using the Command Prompt towards using PowerShell. 

    Getting this command back is not very difficult, but it does require some tinkering in the Windows Registry. If you don’t feel comfortable doing that, it’s best to skip this method, but if you really want that context menu option back, here’s what to do.

    First, click Start and type regedit. Then click on the regedit program entry.

    Open Command Prompt in Folder Using Windows Explorer image 5

    With the registry editor open, look for the following registry key at this path:

    HKEY_CLASSES_ROOTDirectoryshellcmd

    Open Command Prompt in Folder Using Windows Explorer image 6

    This is where things might start to feel a little risky, but we aren’t doing anything that will break your computer. But make sure you follow these exact instructions!

    Right-click on the key and click Permissions in the context menu.

    Open Command Prompt in Folder Using Windows Explorer image 7

    In the dialogue box that opens up, click Advanced.

    Open Command Prompt in Folder Using Windows Explorer image 8

    At the top of the advanced settings window, you’ll see the listed owner of the key. Click the Change option.

    Open Command Prompt in Folder Using Windows Explorer image 9

    Next, type your username and then click check names to validate it. Then click OK.

    Open Command Prompt in Folder Using Windows Explorer image 10

    Finally, make sure the Replace owner on subcontainers and objects box is selected before clicking OK.

    Open Command Prompt in Folder Using Windows Explorer image 11

    Now we’re back on the permissions page. Select Administrators under Group or user names and select Allow next to Full control. Then click OK.

    Open Command Prompt in Folder Using Windows Explorer image 12

    Now we have to restore the context menu entry for the Command Prompt.

    Back inside the CMD window, all we have to do is change the “DWORD” from “HideBasedOnVelocityiD” to “ShowBasedOnVelocityId”. Just right-click on it and choose rename, then change the name of the DWORD.

    Open Command Prompt in Folder Using Windows Explorer image 13

    If all has gone as planned, you should now see the “Open command window here” option, when you SHIFT+right-click an item in the Windows Explorer window.

    Open Command Prompt in Folder Using Windows Explorer image 14

    Opening The Command Prompt Using Windows Explorer

    This next method of opening the Command Prompt from a Windows Explorer window involves navigating to where the Command Prompt program itself is stored and running it directly from there. This is still useful when, for one reason or another, other means of opening Command Prompt don’t work.

    Open Command Prompt in Folder Using Windows Explorer image 15

    You can find “cmd.exe” in C:WindowsSystem32. If you want to run it with administrative privileges, simply right-click cmd.exe and choose Run as administrator. There are plenty of commands that require administrative privileges to work and this is one of the ways you can start the Command Prompt with those privileges without leaving Explorer.

    You’re In Command Now!

    As they;ve done with HyperTerminal, Microsoft may choose to one day completely phase out Command Prompt, in favor of PowerShell. While that’s not a bad thing in itself, PowerShell could do with some polish to help non-power users who would have been fine with the Command Prompt to use common functions just as easily. Still, until the day Command Prompt actually does go the way of the Dodo, you can rest assured it’s only a few clicks away.

    If you need to improve your Command Prompt skills, then why not check out these 21 commands that every Windows user should know. You’ll be flying through tasks in no time armed with these incredibly useful tricks.

    Leave a Reply

    Your email address will not be published. Required fields are marked *