Connect with us

Mobile

GBM How-To Series # 17 : Adding a command prompt option on the Vista Right-Click Menu

Published

on

Here is a useful “How-To” that I have missed using for some time. It’s an oldie, but a goodie. Surely there are those of us that sometimes brave the innards of Vista’s GUI to do a little command line tango. There are times when when you need to issue commands on several folders you find in a search but want to bite a nail in half from having to go back and forth between Explorer windows and the “DOS” command. (Yea, I know it’s not called DOS anymore, old habits are hard to break) but sometimes, the command prompt is the best tool for the job. Today’s How-To will show you a neat trick for solving this problem.

 command_Prompt

GBM How-To Series # 17 : Adding a command prompt option on the Vista Right-Click Menu

windowsvista

Here’s how…

Step 1 : Load RegEdit.exe

From the Vista Start Search bar, enter “regedit” then Enter to load the registry editor. The Vista UAC may prompt you, so go ahead and let it run.

Step 2 : Locate the registry entry

Navigate your way to the HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell entry. You can do the “Find” thing in RegEdit, but you can likely navigate there a lot faster. The keys are in alphabetical order, so just look carefully and you will be there in no time. One you find this key, you are ready for the next step.

Step 3: Create a new registry key

In the “Shell” folder, create a new registry key called something like “Command Prompt Here” or whatever you would like to see in your windows explorer menu when you right-click. To do this right click on “Shell” and select “New” then “Key“. This is where you enter the key label for the right-click menu. Now lets create a sub-key under “Command Prompt Here” called “Command” in the same manner. Got it?! Great. Now for the next step.

Step 4: Edit the values in the new key

We need to enter the command into the newly created sub-key called “Command“. To do this, Right-Click on the “(Default)” value of the key and select Modify. Enter the following exactly, but WITHOUT THE QUOTATION MARKS…, “Cmd.exe /k pushd %L” as the value of the key and click OK. The “Cmd.exe” part is the command to load the command prompt, while the “/k” switch makes the prompt wait on you to enter commands rather than just exiting. The “pushd” command is used to store the path to the current Windows Explorer location, the “%L” allows the “Cmd.exe” command to access this path.

Step 5: Exit the registry editor

To exit, simply select “File/Exit” from the main menu. Your newly created registry key is now ready for action. Remember that it ONLY works on folders, NOT files.

Tips and Notes:

  • One more time. This ONLY works for FILES FOLDERS!!!! (Oops, fingers ahead of brain…)
  • If you have any doubts about editing the registry, BACK IT UP WITH THE EXPORT COMMAND!
  • The Registry Editor will take you right back to the last place you were editing when you left.
Click to comment

Leave a Reply

Your email address will not be published.

As an Amazon Associate I earn from qualifying purchases.