04 Jul, 2009

How to add Command Prompt Option in your Context Menu?

Posted In: Tips Tricks

share this

  • Technorati
  • del.icio.us
  • StumbleUpon

Context_menu_command_option People who are using Command Prompt for some particular task have to browse to that particular folder if they have to execute the file in that folder in the command prompt window, by default your command prompt will show you your user name Root Directory like this “c:\Document and Settings\user>”.  So you have to travel a huge path to reach your destination folder, which is a hectic work. Just think of how if we can go to that particular destination root directory of the folder when we open command prompt(“D:\mywork\destinatin>”)!!! Cool isn’t it?? Lets learn it from here.

This option enables you to right-click on a folder within Windows Explorer and choose the Command Prompt, which opens a Command Prompt window with that folder as your active directory.

do the following:

Step:1

Navigate in your Registry to

HKEY_LOCAL_MACHINE/Software/ Classes/Folder/Shell 

and create a key called “Command Prompt” without the quotes.

Creating_new_key_in_shell_command_prompt

Step 2:

Set the default string to whatever text you want to appear in the right-click menu. editingstring_andputcontextmenu_value

Step 3:

Create a new key within your newly created command prompt named “Command” and set the default string to Cmd.exe /k pushd %LCreating_new_key_in_shell_command_prompt

Editthestring_placethevalue

Step 4:

You may need to add %SystemRoot%/ before the Cmd.exe if the executable can’t be found. The changes take place immediately. Right click on a folder and your new menu item will appear.

context_menu_commandprompt

commandprompt_contextmenu_with_root

  • Digg
  • Reddit
  • del.icio.us
  • StumbleUpon
  • TwitThis
  • E-mail this story to a friend!

3 Responses to "How to add Command Prompt Option in your Context Menu?"

Subscribe to Comment follow up

1 | lazyking

July 4th, 2009 at 11:20 am

great tips, thanks

2 | Rick

August 13th, 2009 at 9:51 pm

This tip is all over the Internet. Tougher question: how do you add it for the FILE context menu? (Hint: yes, it’s possible.)

3 | admin

August 14th, 2009 at 2:14 am

@Rick,
Yes we can do, but command prompt won’t execute any other files other than .bat and .exe files, so it is not worth to add File Context Menu, we can do it in 2 ways one is by creating a batch file and add it to open with program and another is by choosing the folder option and file types then selecting the command option..

Comment Form

Spam protection: Sum of 2 + 7 ?

Trackbacks

  • (Please don't forget to 'Activate' the email subscription from your Inbox!)