04 Jul, 2009

How to add Command Prompt Option in your Context Menu?

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:


Navigate in your Registry to

HKEY_LOCAL_MACHINE/Software/ Classes/Folder/Shell 

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


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


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.



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

Subscribe to Comment follow up

Comment Form