Saturday, July 14, 2007

Add Global Shortcut Menu Items to All File Types

The previous section of this hack showed how to add shortcut menu items on a file-type-by-file-type basis. In other words, it will be available only on the shortcut menu for the one specific file type you specify. But you can also add that shortcut menu item to every type of file by using a Registry hack. This is useful when you have a program that can open a wide variety of file types, and you don't want to have to add a shortcut menu item for every one of those file types. I use the IrfanView graphics viewer for many different types of graphics, so I want it to show up on all those types. Although it will also show up on file types I won't use it with, such as Word files, it's still worth putting it on the menu globally because of all the time I save by not having to add shortcut menu items over and over again for each file type.

Run the Registry Editor and go to HKEY_CLASSES_ROOT\*. Create a new subkey called Shell if it doesn't yet exist. The Shell subkey can control parts of the user interface. Create a new subkey under Shell and name it what your new command will befor example, OpenWithIrfanView. For the default value of the new subkey, type in the text you want to appear on the shortcut menufor example, Open with IrfanView. Create a new subkey named Command under the subkey you just created. This subkey will contain the command string you want to be executed to open the file. For the default value of the Command subkey, enter the command string you want to be executed when the shortcut menu item is chosenfor example:

"C:\Program Files\i_view32.exe" "%1"


Exit the Registry. The new shortcut menu item should be available immediately, though you might need to reboot for it to take effect.

AddThis Social Bookmark Button

0 Comments: