Registry Trick for Adding Custom Context Menu for File Right Click

Many times you need to execute particular exe or command for a specific file. For an example if you are browsing the directory and you need to execute particular command on that file on the command prompt. In such situations you will need to open a command prompt then you need to go to that directory, then select the file and execute the command, this requires some time.  And if you are going to repeat this multiple times then you are going to waste much of your time.

Imagine on the right click of any file if you get option of opening command prompt which will take you directly to that directory, instead of you browsing to that directory.

Yes, you can do that by a simple registry trick. Before going ahead please ensure that you are fully aware of windows registry editor and consequences of modifying the registry incorrectly.  To have a backup of the registry follow steps mentioned in the link Backup & Restore Windows Registry.

Steps for registry trick:

  1. Open Start menu, click on Run.
  2. Type regedit and click OK, which will launch the registry editor.
  3. Navigate to registry key HKEY_CLASSES_ROOT\*\shell
  4. Create new key with name Command Prompt, this is the context menu item which will appear on right click of any file.
  5. Create the key with name Command under key Command Prompt.
  6. Under the command key you will find the  key with name (Default) with type REG_SZ, if its not of that type then delete the key and create new key with name  (Default) of type REG_SZ.
  7. Set the value of (Default) to cmd. As we want to open command prompt on click of this menu.
  8. Now close the registry editor. Browse to any file on computer and right click will show you your new context menu. 

This trick I have tried on Windows XP and Windows 2003 and it works. 

No comments:

Post a Comment

Golang: Http POST Request with JSON Body example

Go standard library comes with "net/http" package which has excellent support for HTTP Client and Server.   In order to post JSON ...