Skip to content

How to open Command Prompt Window in a folder in Windows 10?

  • by
  • 5 min read

The Command Prompt is an essential Windows utility that lets users get a lot of tasks done rather quickly. Knowing a few tricks around the tiny black box here always helps.

If you’ve ever fired it up though, you must have noted that the default directory the Command Prompt starts up in is the user directory. Now that is fine if you’re running the usual Windows utilities but in case you have to run something that requires you to navigate to another directory, it can be a bit of a hassle. 

In this article, we’re going over two different ways you can fire up command prompt directly in whatever directory you want.

  • Adding command prompt to the context menu.
  • Launcing command prompt using Windows Explorer.

Also read: How to run programs as an administrator in Windows 10?

How to open Command Prompt using Windows Explorer?

This is a quick way of firing up command prompt in any directory you want without ever having to leave the Windows Explorer.

Step 1: Head over to the directory where you want to open the command prompt.

How to open command prompt window in a folder in windows 10?

Step 2: Click on the address bar and type in cmd.

How to open command prompt window in a folder in windows 10?

Step 3: Press Enter. The Command Prompt will open in that Directory.

How to open command prompt window in a folder in windows 10?

Read more: How to login as administrator in Windows 10?

How to add Command Prompt to the context menu?

Head to whatever directory you want and press Shift + Right Click. You’ll see an option called Open Powershell Window here.

But since we’re looking to open command prompt here, we’re going to have to make some registry changes to replace Powershell with Command Prompt. 

Step 1: Press Windows Key + R and type in Regedit

How to open command prompt window in a folder in windows 10?

Step 2: Once the Registry Editor opens up, navigate to HKEY_CLASSES_ROOT\Directory\Background\shell\cmd

How to open command prompt window in a folder in windows 10?

Step 3: Right Click on the cmd folder and click on Permissions from the context menu. 

How to open command prompt window in a folder in windows 10?

Step 4: A new window will open. Click on the Advanced button.

How to open command prompt window in a folder in windows 10?

Step 5: Click the Change option on the top of the Window.

How to open command prompt window in a folder in windows 10?

Step 6: Under the Enter the object name to select the dialogue box, type in your Windows username. Click on the Check Names button to verify it and then click on the OK button.

How to open command prompt window in a folder in windows 10?

Step 7: Hit Apply in the Advanced Security Settings for cmd window.

How to open command prompt window in a folder in windows 10?

Step 8: Now we’re going to give Full Control permissions to our entry. So go ahead and check the dialogue box and click Apply and then OK. 

How to open command prompt window in a folder in windows 10?

Step 9: Right-click on the HideBasedonVelocityID and then click on Rename.

How to open command prompt window in a folder in windows 10?

Step 10: Rename the entry to ShowBasedonVelocityID. If you get an error, make sure you’re logged in from an Administrator account and have the valid permissions. 

How to open command prompt window in a folder in windows 10?

Step 11: And we’re done. Simply Shift+Right Click in any directory and you’ll see the Open command window here option right there. Now you can open command prompt wherever you want.

How to open command prompt window in a folder in windows 10?

If for some reason, you want the option to show up only in the folder context menu, follow the exact same steps above but instead of the aforementioned location head over to HKEY_CLASSES_ROOT\Directory\shell\cmd instead.

How to add Command Prompt (Admin) to the context menu?

The method mentioned above only runs command prompt with regular privileges. If you need to run command prompt as an admin, go ahead and download the following registry file.

You can get the file here

Step 1: Once you’ve downloaded the file, simply double click on it. Windows will give you a security alert, Click on Run.

How to open command prompt window in a folder in windows 10?

Step 2: The Registry editor will let you know that you’re making changes to the registry. Click on Yes.

How to open command prompt window in a folder in windows 10?

Step 3: You’ll see a message telling you that the changes were successful

How to open command prompt window in a folder in windows 10?

That’s it. You can now launch the command prompt as an admin.

How to open command prompt window in a folder in windows 10?

Also read: How to enable Remote Desktop in Windows 10?

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: yadullahabidi@pm.me.

>