4 Ways To Open Command Prompt Window in a Folder In Windows 10

open command window here 1 1open command window here 1 1

When you open the command prompt by going to Run –> cmd, you will notice that by default, it opens in the user profile directory path. Sometimes, the user needs to open the command windows with the currently opened folder path. This article explains the exact scenario.

Command Prompt is the command-line which enables users to execute different programs and commands. Microsoft is slowly removing command prompt support from all its major Windows platforms. PowerShell is the alternative to Command Prompt which supports almost all the commands of DOS and much more. Some users still insist on using Command Prompt instead of PowerShell.

If the program you want to run in Command Prompt is not listed in the PATH variable, the Command Prompt will give you an error that it could not find the executable file. For this, we need to manually go to the folder where that particular program is located. One way of doing this is to type in the complete path of the file. Another way is to directly open the command prompt windows inside the folder. The second approach is more visual and easy to implement.

Pro Tip: If you are using Windows 10, just open the folder and go to File menu –> Open Windows PowerShell. You also have the option to open Windows PowerShell as Administrator.

Open PowerShell in folder
Open PowerShell in folder

In this article, we will discuss different techniques by which we can open command windows in a folder, the most popular being “Open Command Windows Here” context menu item. Let’s start.

Add Open Command Window Here to the context menu using Registry Editor

  1. Click Windows + R then type regedit. This will open Windows Registry editor.
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 13
  2. Registry editor window will open. After that go to HKEY_CLASSES_ROOT. Further go into Directory\shell\cmd
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 14
  3. and right click Permissions. The following window will appear.

    permissions window
  4. Then click on the Advanced option.
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 15
  5. After that, click on change at the top of the window
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 16
  6. Type your username in “Enter the object name to select” and then click on the check name to validate that name.
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 17
  7. Press Apply and then OK. When you are done with those Administrative modes in Group or user names of permissions for cmd window and tick Allow on Full control. Click Apply and then OK
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 18
  8. Once you are done with it, click on HideBasedonVelocityID and rename it ShowBasedonVelocityId
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 19
  9. Now when you click the Shift key and right click you will see the option “Open Command Window here
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 20
Disable, enable, restart network ad...
Disable, enable, restart network adapter on Windows 11

This will permanently add “Open Command Window here” to the Windows Context menu. After editing the Registry, you will be able to open the command prompt by right clicking inside any folder and selecting “Open Command Window Here”.

Add Open Command Window Here using the REG file

This is basically the same method listed above. For your ease, we have created a REG file for all the actions mentioned above. You just have to download and run the REG file. It will automatically add the desired values inside the Windows Registry.

4 Ways To Open Command Prompt Window in a Folder In Windows 10 21  Add Open Command Window Here to Context Menu.reg (304 bytes, 20,323 hits)

If the value does not come after running this file, please try restarting Windows Explorer or the computer.

Open Command Prompt In A Folder Using Keyboard Shortcut?

If you are in a hurry then this is the easiest method of opening Command Prompt inside the folder. Just follow the steps below:

  1. Go to the required folder.
  2. The press Shift + right click mouse button anywhere in the folder window.
  3. Select the “Open command window here” option from the context menu.

Using CMD command in File Explorer to open Command Prompt Window

You can open a command prompt in any of your desired folder by using the file explorer location bar.

  1. Go to your desired folder and click on the location bar of Windows Explorer.
  2. Then type cmd and press Enter key.
  3. The command prompt will be opened in the folder.
    4 Ways To Open Command Prompt Window in a Folder In Windows 10 22

One drawback of this technique is that it will open the command prompt in the regular user privilege mode and not in the administrative mode. To open it in administrative mode:

Select Windows + R and type cmd.

Click Ctrl+Shift+Enter instead of just hitting enter to open the Command Prompt in administrative mode.

You can also open PowerShell window using the same technique. Just go to the folder and then type powershell in the File Explorer address bar. This will open PowerShell in the same folder location or path.

Add “Open Command Window Here” with Administrative privileges in the context menu

In order to “open Command Window here ” with administrative privileges you  can download the following file.

4 Ways To Open Command Prompt Window in a Folder In Windows 10 21  Open Command Window Here (Administrator) to context menu.reg (215 bytes, 12,257 hits)

This will add a context menu option for the admin command prompt.

How to get back Command Prompt in Win+X menu?

In order to change the Windows Powershell options with Command Prompt go to Settings –> Personalization –> Taskbar.  After that turn off the option of “Replace Command Prompt with Windows Powershell Option in the menu when i right click the start button or press Windows key +X”.

4 Ways To Open Command Prompt Window in a Folder In Windows 10 24

The Command Prompt still remains an important part of Windows Operating System and using the methods discussed above, you will be able to make productive use of your time by using shortcuts. What is your favorite method of running command prompt without typing in the folder paths?

6 comments

  • Jeff

    The part where it says type cmd in the file directory part is literaly the simplest and most straightforward thing in this article for not so tech-savvy people like me

  • Dave

    Hi, thank you for this article. So I see a way to get “Open Command Window Here” with a shift+right-click, and a way to get “Open Command Window Here (Administrator)” with just the right-click… but is there a way to get “Open Command Window Here” [NOT as Administrator] with just a right-click and not having to shift?

  • Gluttony
    Gluttony

    Thanks for this article but there are two issues for me:
    – For “Add Open Command Window Here to context menu using Registry Editor” instead of steps 4, 5 and 6 (that did not work for me), from the permission window (opened on step 3), in “Group and user names” I clicked “Add…”, added my user as in step 6, and back to permission windows, select my user and in “Allow” select “Full control”, then I had the rights to rename the key.
    – Anyway, it seems it is not working, since, after the rename of HideBasedonVelocityId to ShowBasedonVelocityId I still don’t have “Open Command window here” when pressing shift + right click, but I figured out that I have an “Open PowerShell window here” that seems to do the job (at least what I want that is to run a command line exe), but it also seems it was already present since it is still available even after renaming back ShowBasedonVelocityId to HideBasedonVelocityId.

  • Ranjith
    Ranjith

    Cannot edit HideBasedonVelocityId: Error writing the values new contents.

    NOT WORKING

Leave your comment