Pages

Sunday, October 3, 2010

Modifying the Right-Click Menu

 Modifying the Right-Click Menu

Now on with the show...
  • First we need to find the location of the program we want to use
  • (Note: You can also get this information from the "Properties" box if you have a shortcut to the program on your desktop. Otherwise...)
  • Click on "Find Files or Folders" in the Start Menu
  • Search for the program you want to add to the right-click menu
  • Make a note of the folder where the program is found
  • Some common programs you might like to use are:
  • Netscape.exe - Netscape Communicator
  • IExplore.exe - Internet Explorer
  • WordPad.exe - WordPad
  • From the Start Menu select "Run"
  • Enter "regedit"
  • This runs the Registry Editor
  • Open the HKEY_CLASSES_ROOT "folder"
  • This opens a long list of file extensions, (.exe, .html, .ini, etc)
  • Following the extension list, extension groups are listed, ( for example "htmlfile" refers to all files with ".htm" and ".html" extensions, "jpegfile" refers to .jpg and .jpeg files, "giffile" refers to .png files)
  • Note: To find the extension group associated with a particular extension, click on the extension and note the value in the "Data" field, (on the right side), for the value named "(Default)"
  • Select the extension, or extension group you wish to modify - typically, you will want to modify an extension group, rather than an individual extension
  • In this example we want to add a "Netscape" option to all .html and .htm files, so we open the "htmlfile" extension group
  • Note: we could modify each extension separately if we wished
  • Right click on the "shell" option
  • Select "New"
  • Select "Key"
  • This creates a new key with a default name
  • Change the key name to whatever you wish to appear on the right click menu
  • Now right click on the new key
  • Select "New"
  • Select "Key"
  • This creates a "subkey" of the key we just created
  • Rename this subkey "command"
  • Note that in the right hand window the name "Default" and "value not set" appear
  • Double click on the "Default", (or the small "ab" icon to the left)
  • This brings up an Edit window which is used to set the default value
  • The "value" to enter is the name of the program to run
  • The format of the value field is:
  • FOLDERNAME\PROGRAMNAME "%1"
  • In this example its:
  • E:\Program Files\Netscape\Communicator\Program\Netscape.exe "%1"
  • Note: When we use the new menu option, "%1" is replaced with the name of the file we clicked on. This tells Netscape which file to open
  • Click "OK" to set the default value
  • This completes the process - Right clicking on any "htmlfile" will now have a "Netscape" option that opens the selected file in Netscape
  • You can add as many right click options as you wish
  • In this example, an "Edit" command has also been added which will open the file using WordPad
  • Note that the menu options are listed in the order in which they were created
  • The simplest way to reorder the options is to rename the option that you want to appear at the end of the list
  • To rename a menu option, right click on the key in the Registry Editor and select "Rename"
  • Rename the key to a temporary name, then rename it back to its original
  • In the above case, we renamed the "Netscape" option and it now appears below the "Edit" option
  • Note that you can remove the menu item by deleting the key in the Registry Editor
  • The "Delete" option is directly above the "Rename" option
  • Note that to delete the "Netscape" key, you must first delete its "command" subkey

No comments:

Post a Comment