Windows 10 Command Prompt Here

You’re sitting with a configuration task using your Command Prompt (CLI) and need to drill down 4, 5 or 6 levels below root (C:\). Even if you use the TAB key it’ll still be a lot of typing.

Once again, I found this document in my old Blog posts and was initially written for Windows 7 and I got curious if this could be used using Windows 10. It works like a charm.

I’ve tested this in Windows XP, Windows Vista, Windows Server 2003/2008 and now also Windows 10 and I would assume that it works on other Windows versions as well. When I have the time, I will test it out and add the result here.

With this little change in the Registry you can use File Explorer to drill down to any level, right-click on the folder and select ‘Command Prompt Here’.
This is what you must do…

Lastly, I will rise a warning for changes in the Registry

This procedure will change your registry settings. If you are doing the wrong thing you can render your Windows operating system useless.

Here we go…

Open your Registry Editor

Figure 1

From here you select the Local Machine > Software > Classes > Folder > shell

Right-click on shell and select New Key

Figure 2

Give the key a name: PT Command Prompt and click OK.

Now you double-click on the Default key in the right pane and you will receive following dialogue.

Figure 3

Enter Value data: I wrote ‘PT – Command Prompt Here’

The value you enter here in Figure 3 is what you will see when you right-click on a folder in Windows Explorer.

Next step to take is to provide an action to what happens when we right-click and select Command Prompt here.

Figure 4

And to accomplish this you have to right-click the PT Command Prompt as in Figure 4 and select New – Key. Give the new Key the name ‘Command’ as in Figure 4.

Figure 5

/k – makes the command prompt persistent

pushd %L – stores the value of current directory/folder

The Value data should be: cmd.exe /k pushd %L
Click OK

This is all there is to it. You can now close Regedit.

Let’s try it out.

Following 2 screen shots shows how it works out.

Figure 6
Figure 7


0 0 votes
Article Rating
Tags: , ,