Open Command Window Here

Let’s find out how to add “open command window here” in the Windows 10 file explorer context menu. The ability to open a command prompt window straight from a certain folder in file explorer can save you not only quite a few keystrokes but also the frustration of typing errors and having to try again. In short: it can be a huge timesaver. But where has it gone?

Previously, there used to be an option to open a command window directly in a specific folder in file explorer ...

Open Command Window Here

but this option seems to have disappeared somewhere.

No Open Command Window HereNo option to open command window here (option to open powershell window instead)

In this article I will demonstrate how to get it back, plus I will show you another quick tip that can save you the agony of having to cd through a ton of levels of folders.

In fact, let’s start with that quick tip first, because the part of getting back the “open command window here” involves quite a bit of registry fumbling while the quick tip might be just what you need.

Quick Tip to Open Command Window Here

If you are looking at a certain folder in file explorer after having clicked a bunch of directories while navigating to the one you need, you might want to have an option to open a command window that would immediately place you in that particular directory. For instance, let’s take a look at the image below, where I drilled down to the folder

C:\Users\Erik\AppData\Local\Google\Chrome Cleanup Tool

Suppose I wanted to open a command window here, then I could simply click in the address bar of file explorer and type cmd …

Type cmd to open command window here

… and then press ENTER. That would give me a command prompt window with the desired directory as the current folder.

Open Command Window Here

And that might be just easy enough for you to be able to open a command window in a folder from your file explorer.

Oh, and before I forget, there is another quick tip that you can try to access the open command window here.

If you are looking at any directory in file explorer, you can also SHIFT + right click the folder and then you will also have the option to open command window here.

SHIFT + right click to open command window here

And another  tip you might like is this next one. You might have noticed that you can right-click any folder in a file explorer window and that there is an option to “open powershell window here”. In some cases a powershell window might do for you, but sometimes you might want to use commands that do not work in a powershell window (and do work in a command window).

Open Powershell Window Here

You can replace the “open powershell window here” with “open command window here” by following these next steps.

First, click the Windows start button in the bottom left corner and select settings.

Go to settings

Then click “Personalization”.

Select personalization

Then click taskbar.

taskbar ...

And then deselect the option to “Replace command prompt with Windows powershell in the menu when I right-click the start button or press Windows key + x”.

Set this switch to off

If you set this option to the “off” position, you will also get an open command window here when you right click a folder in file explorer.

You can also add the option to open command window here by making a few changes in the Windows registry. If you’re interested in that, please read on.

How to Add Open Command Window Here to File Explorer Menu

Open the Windows registry editor. You can do this by pressing the Windows logo key + r on your keyboard.

Windows key + r

That will open up a “run box”.

In the run box, type “regedit” (without the quotes) and click ok.

Open Command Window Here - regedit

If a user account control window comes up, click yes to continue.

User account control

The Windows 10 registry editor will now open up. Navigate to

Computer\HKEY_CLASSES_ROOT\Directory\shell\cmd

Navigate to Computer\HKEY_CLASSES_ROOT\Directory\shell\cmd

Now right click on cmd and select permissions.

Select permissions

Registry editor will now open the permissions dialog box for the cmd subkey. In this screen, click on the advanced button.

Click advanced

Now the advanced security settings for cmd window will open. At the top of the window, look for the “owner” of the item and click on change.

Click to change the ownership

Now type your username in the box where you can enter object names and then click the button that says “check names”.

Type your username and click

Now your username should appear underlined (preceded with the name of your computer), which indicates that you now have the correct entry for the object name. Click the ok button to proceed.

Click ok in this window

You’ll land back in the advanced security settings for cmd and you’ll notice that your username is now displayed in the owner section of the screen.

Advanced security settings for cmd

Now you’ll arrive once again in the permissions for cmd box. Select the administrators group and make sure to select the check box next to “Full control”. Then click ok.

Full control for administrators group

Back in the registry editor window, right click the HideBasedOnVelocityId item and select rename from the menu.

Rename HideBasedOnVelocityId

Rename this registry dword to ShowBasedonVelocityId and close registry editor.

Rename to ShowBasedOnVelocityId

With this you will have the option to open command window here again in your file explorer context menu.

Open command window here


If you've enjoyed this article or found it useful, I'd appreciate it if you'd let me know by clicking the Like (or Share) button below. Thank you!


New! Comments

Have your say about what you just read! Leave me a comment in the box below.