How to create new context menu options - gHacks Tech News

How to create new context menu options

The context menu pops up when you right click an item giving you some options based on the extension of the file.Windows displays several default options regardless of file type, open with for example that lets you select a program you want to open the file with, but also file type related options like unpacking archives or playing music.

I'd like to provide you with a way to add menus to the Windows Explorer context menu. This can be very useful if you use an option over and over again that is not directly listed in the context menu. So, it is basically a shortcut that helps you complete certain things faster in Windows.

Open the Windows Registry by opening the run box with the keyboard shortcut Windows-R, typing regedit and tapping on the enter key afterwards.

Open the first key HKEY_CLASSES_ROOT and select the * which should be the first key beneath it. Expand the * key and select the subkey shell. If shell does not exist you create it by right clicking the * and choosing New -> Key from the menu.

Name the key shell. Right click the shell key afterwards and select New -> Key again. Find a name that describes the action, for example Open with Notepad, Open with Wordpad and so on.

context menu

Now right click the Default string on the left and select Modify. The name that you put in here will be the name that pops up when you right click on a file. Select Open with Notepad for example. Right click the key again and create a new key. You have to name this new key Command. After this right click the Default String again and enter the filename of the program that you want to use, for example notepad.exe %1

%1  means that it will perform the action on the selected file. You now should have a structure that begins with *, a subkey shell, a subkey Open with notepad, a subkey command. To test if this is working right click a file on your desktop. The new command should appear in the context menu. Repeat the process for all programs that you use regularly in Windows Explorer.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. said on March 19, 2008 at 7:57 am
      Reply

      How about how to add a new file type to the New portion of the shell menu?

    Leave a Reply