Custom Context Menu for Applications - Understanding Context Menu in Registry
Creating a Custom Context Menu for any application means altering or adding commands to the existing context menu. You can go about adding context menu to have your own commands in the custom context menu. You will be tweaking the registry editor to add custom context to aa menu.
Factors important for creating custom context menu are: file association or shell handlers (keys); verbs (keys); commands (keys), and Strings. Keys refer to items in left pane while strings are stored in the left pane of the registry. Strings are related to commands and contain information on the program to execute.
The very first key of the Windows Registry, HKEY_CLASSES_ROOT contains the different registered types and association handlers.
If you expand the key, you can see a list of file types registered on your computer. These are the file association handlers where you will place verbs to create your own custom context menu. For example, look for "HKEY_CLASSES_ROOT\txtfile" under the key and expand it to see the options. You can see Print, Printto, and Open - each having a sub-key, command that contains a command string in right pane.
The group HKEY_CLASSES_ROOT \Folder\ShellEx\ContextMenuHandlers applies your custom context menu to all Folders. HKEY_CLASSES_ROOT \SystemFileAssociations\Directory.Audio applies your custom context menu to all audio folders. Similarly, HKEY_CLASSES_ROOT\Excel.Template is meant for adding context menu to all MS Excel templates.
Before you begin tweaking the registry editor to add or remove options from custom context menu, you must know what are verbs and data. You also need to know the string (command line and parameters) about the applications for which you are creating custom context menu.
The best way is to research the HKEY_CLASSES_ROOT before starting to tweak the registry is to create a custom context menu.
IMPORTANT: Make sure you have a backup copy of the registry before you play around in the registry.
NOTE: All the items in the custom context menu and default context menu are present under Shell or ShellEx under different handles of HKEY_CLASSES_ROOT. If there is no Shell or ShellEx, it means there is no special context menu associated with that file type - though you can see the default context menu for the group (file group/folder).