Those &%$# Context Menus

The "Right-Click" Menus

How to Remove (or in some case, add)

Those blasted context menus . . . the menu entries that show up when you righ-click on a file or folder.  Some of the, such as WinZip and WinAmp MP3 player's "Enqueue" - are very useful . . . others are just junk, added by the many utilities we need, but don't want on our right-click context menus. The default Windows items, such as Create Shortcut, Delete, Rename, etc - you can't change.  But the add-ons you can.

The context menus are those boxes that pop up when you right-click on a file or folder or drive - in Windows Explorer, or IE, and many other applications.  They have text entries, that are shortcuts to a specific task, such as opening a file in a specific application.

It is important to realize that each file type can have it's own, unique, context menu !!  First a bit on the tech details, and then we will show you how to manage these things . . .

File Associations - Simple and Compound

The context menu that pops up for any given file type - depends on that particular file association (i.e. what program does Windows associate with that file extension).

Windows uses file associations to determine what actions can be taken with files on your system, based on their extensions. This information is stored in the HKEY_CLASSES_ROOT section of the Registry. There are basically two types of associations: Simple and Compound.

A simple association associates commands directly with a specific file extension. This is the way most file associations were implemented in 16-bit versions of Windows, and 32-bit Windows maintains this mechanism primarily for compatibility with 16-bit applications. These associations use a single extension key in the registry (that is, any subkey of HKEY_CLASSES_ROOT whose name begins with a ".'), and the associated commands are defined using subkeys of that extension key.

A Compound association usually employs at least two registry keys: a master file type key (any subkey of HKEY_CLASSES_ROOT whose name does not begin with a ".") along with one or more extension keys. In this case, the default string value assigned to an extension key contains the name of a master file type key, and the commands themselves are defined using subkeys of the master file type key. This allows Windows to associate multiple file extensions with a given file type and command set.

It is possible to have commands defined both for the file extension and the master file type for that particular extension.  When this happens, the master file type takes precedence, so that any commands associated directly with the file extension become unavailable.  The master file type always takes precedence !!

The Problem

Like your system tray . . . context menus just keep growing and growing . . . unfortunately, unlike your system tray - they are impossible to fully clean up !!!  Why?  Well, some of them fully tangle themselves into your registry so that they become un-removable.  

For example, the Context Menu entry WMPBurnCD (Windows Media Player Burn CD) shows up in 50 registry locations !!!  The only way to find and remove them all is by taking a half hour to search and delete - or by using Registry First Aid for an automated search.  BUT - you may get into trouble of you delete them all -it may cause Media Player itself to stop working.

Even worse . . . come entries have no corresponding string in the registry !!  For example, my system, when any MP3 files is right-clicked . . . show numerous entries.  One of those is "Convert Media Format", which opens a Microsoft Plus utlity to convert MP# files to . . . you guessed it - WMV Windows Media Player files !!!  However, a search of the registry for the term "Convert Media Format" comes up empty.  The text is probably coded either somewhere else, or in encrypted format.

Generic Methods for Removal

In general, try the following to get rid of them:

Utilities (click to download)

ContextEdit  -  the only Context Menu editor !!  From PCmag.  Unfortunately, it does not work for all file types (it failed to remove the WMplayer entries, even though I unchecked all boxes for all MP3 file types and for all the WMplayer file types).  But it does succeed on the more simplistic menu entries.

Context Magic - this utility only allows adding entries - and they will all be listed as a drop-down list under the single entry, "Context Magic".

CmenuExtender - similar to Context Magic - allows the addition of right-click menu entries, but you cannot delete any except for the ones you created.

 

Manually removing Context Menu entries with Regedit

see also http://www.jfitz.com/tips/rclick_custom.html  (seems to be for Win98 - not XP - but the reg locations are similar)

and     http://www.kellys-korner-xp.com/xptweaks.htm   (lists info on certain, specific entries only)

Backup Your Entire Registry - first back it up in case something goes wrong. You can use NTbackup, but this creates large files on your drive.  The best way is to simply set a system restore point (Start/Programs/Accessories/System Tools/System Restore . . . and then follow the prompts to create a System Restore Point). If you need to restore your Registry, just go back to System Restore and follow the prompts there.

Backup portions of your Registry - while editing your reg, just select File/Export to save any selected folder to a *.reg file.  If you have problems after your changes - then simply Import the same file.

Steps:

  1. backup the entry for the Context Menu item that you want to get rid of
  2. delete the entry for the Context Menu item that you want to get rid of
  3. test it within Windows Explorer

For example, in my system under [HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers] I found the key Symantec.Norton.Antivirus.IEContextMenu which I deleted. 

This is where many of the Context Menu items are located.

HKEY_CLASSES_ROOT

for Files
HKEY CLASSES ROOT\*\OpenWithList
HKEY CLASSES ROOT\*\shellex\ContextMenuHandlers

for Directories and Folders (they are the same thing, but the registry has separate entries for each)
HKEY CLASSES ROOT\Directory\shell
HKEY CLASSES ROOT\Directory\shellex\ContextMenuHandlers
HKEY CLASSES ROOT\Folder\shell
HKEY CLASSES ROOT\Folder\shellex\ContextMenuHandlers

For Drives
HKEY CLASSES ROOT\Drive\shell
HKEY CLASSES ROOT\Drive\shellex\ContextMenuHandlers

NOTE: you can also go to a specific File extension (example: 
HKEY CLASSES ROOT\.txt\ShellNew) and right click on the ShellNew key and 
select Delete, if the item shows up in the New context menu.

*** the other main categories of the registry, such as HKEY_Local_Machine, also contain data that effects the Context Menu entries, but the list of locations is exhaustive.  You will have to do a search.


Adding Context Menu Entries Manually

You can add entries to allow a quick method of performing certain tasks.  Trying this, and following several sets of instructions on the web - I have found that it often does not work !!!    But you may have more luck with it.  The problem is that the entries usually have a corresponding long, numeric key, which is also listed under "Classes", such as {C2FBB630-2971-11d1-A18C-00C04FD75D13} for the entry "Copy To".  So when you add a new entry - you may need to add a class - but what entries require a Class entry as well?  What number should you pick?  Who knows !!??

For example, you may want to play MP3 files in a special player that you like - but did not add it's own shortcut entry to the Context Menu for MP3's.

Example - add a right-click entry: "CopyTo and MoveTo"


To add Copy to... and Move to... context menu options go to start > run > regedit and then create the following registry keys ( i just renamed the winzip key which i dont need in the right click menue and changed it to "copy to" and then added the value)

HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Copy To
HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Move To
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Copy To
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Move To

For the Copy To's set the default value to {C2FBB630-2971-11d1-A18C-00C04FD75D13} and for the Move To's set the default value to 
{C2FBB631-2971-11d1-A18C-00C04FD75D13}

Now when you right click on a file or folder, above the send to option are two new options: Copy to Folder and Move to Folder
You can copy or move files or directories to other folders with this.

" Send To Toys" - an Excellent Context Menu Utility for "adding" Options

Maybe you have a few items that you would like to add to them. If so, check out Send To Toys by Gabriele Ponti. This ingenious collection adds several new items to the menu you see when you right-click a file and select Send To. For example, you can send just a file's name and path to the Clipboard for easy pasting into an e-mail message or other destination. Or you can send that file name to a command prompt while automatically changing the prompt's current directory to the same location. One command opens a dialog box to select a folder destination (if one isn't already present on the menu), and another sends the selected file and its path to the Run box. If you right-click a folder, you'll also have options for adding it to or removing it from the Send To menu. What's more, this nifty product works in all versions of Windows and is completely free. Click here to download a copy.

 

More Details . . . from PCWorld

*** some of the following info I have already discussed ***

Some utilities that add commands to the context menus also provide easy ways for you to customize or remove the items. This is the best and safest approach to tossing context-menu junk. If no such option is available, you can usually alter the menus in all versions of Windows via the Registry. But first, let's look at some common offenders and their built-in menu-trimming solutions.

Unzip WinZip menus: The popular compression utility WinZip may add several commands (such as 'Add to Zip') to your right-click menu for selected items, or it may place the commands on a separate WinZip submenu. To make changes, start WinZip; if it opens in the wizard mode, click WinZip Classic. Choose Options, Configuration. In version 8.1 and later, click the Explorer Enhancements tab. To avoid the hassle of clicking a submenu for these commands, uncheck Display context menu items in a submenu (version 8.1 and later). To change the commands on the menu, check or uncheck items in the 'Context menu command' box. To get a slightly sprightlier menu, uncheck Display icons on context menus (see FIGURE 1). Finally, to remove WinZip commands from your context menus entirely, uncheck Use shell extension (versions 7 and 8) or Enable Explorer enhancements. Note, however, that this will also remove the extraction options you see when you right-drag a .zip file, and it will end your ability to drop items on a .zip file icon. When you're done, click OK.

Disenqueue Winamp: The Winamp freeware media player may add three commands to your folder menus: 'Play in Winamp', 'Enqueue in Winamp', and 'Add to Winamp's Bookmark list'. To remove the commands, choose Options, Preferences (or right-click in the window or the title bar and choose Options, Preferences). In the tree pane on the left, select File types under the General Preferences branch (the Setup branch in earlier versions). Now uncheck Show Winamp in folder context menus in Windows Explorer  or Directory context menus in older versions; then click Close.

Power down PowerDesk: If you have V Communications' fabulous shareware file manager PowerDesk or PowerDesk Pro, you can fine-tune what the utility adds to your context menus. Choose Options, Preferences and click Context Menus. Each check box in this panel corresponds to one menu command; uncheck the ones you don't want . To place all of them on a single submenu that cascades off your context menu, make sure that Cascade Menus is checked. 

Although PowerDesk's Preferences dialog box lets you remove most of its context commands, you'll still see its File Finder command when you right-click a folder. To eliminate this, see the next tip.

Restrict Explorer context menus: In Windows 2000 and XP Pro, you can use the Group Policy tool to remove certain items from the context menu for My Computer and folders. Say you don't want the Manage option on My Computer's right-click menu (which launches the Computer Management administrative tool): Choose Start, Run, type gpedit.msc, and press <Enter>. In the tree pane on the left, navigate to and select Local Computer Policy\User Configuration\Administrative Templates\Windows Components\Windows Explorer. Double-click Hides the Manage item on the Windows Explorer context menu, select Enable, and click OK.

You can still launch the utility by choosing Start, Programs (or All Programs), Administrative Tools, Computer Management, or by clicking Start, Run, typing compmgmt.msc, and selecting OK.

To remove the entire context menu for folders, navigate to the Windows Explorer icon on the left as described above, and double-click Remove Windows Explorer's default context menu (in Windows 2000) or Remove Windows Explorer's default context menu (in XP). Select Enable and click OK. The next time you right-click a folder, the desktop, or any icon in Explorer, nothing will happen (toolbar context menus will still work, however). As with the previous tip, undo these changes by returning to the dialog box in question, selecting the Not configured option, and clicking OK.

Resort to Regedit

If a program doesn't provide a way to remove its commands, you may have to edit the Windows Registry. 

Backup Your Entire Registry - first back it up in case something goes wrong. You can use NTbackup, but this creates large files on your drive.  The best way is to simply set a system restore point (Start/Programs/Accessories/System Tools/System Restore . . . and then follow the prompts to create a System Restore Point). If you need to restore your Registry, just go back to System Restore and follow the prompts there.

Backup portions of your Registry - while editing your reg, just select File/Export to save any selected folder to a *.reg file.

With your backup in place, select Start, Run, type regedit, and press <Enter>. At the top of the tree in the left pane, double-click HKEY_CLASSES_ROOT. This Registry key contains data on file types, including the context menus associated with each. To trim items from the right-click menu for folders, navigate the tree diagram on the left to HKEY_CLASSES_ROOT\Directory\shell. Double-click shell to see additional keys. Each key corresponds to one command on the right-click menu for folders. You won't see Windows' built-in commands for folders (you can't remove those); but you should see folders for commands that have been added by other applications.

Back up this portion of the Registry in case you change your mind later or make a mistake. With the shell key selected in the left pane, choose Registry, Export Registry File or File, Export Registry File. Find a suitable location for your backup file (don't worry; it will be small), give the file a name, and make sure that Selected branch is highlighted. Click Save, and then select the key corresponding to the menu command you want to eliminate. For example, to remove the 'Scan for Viruses' menu command installed by McAfee VirusScan, select the VirusScan key and press <Delete> (or right-click it and choose Delete). When you're done, select File, Exit to close the Registry Editor. The next time you right-click a folder, the extra command will be gone. If you change your mind, locate the Registry export file you created earlier, right-click it, and choose Merge. Click Yes and then OK to acknowledge the process.

Some commands that appear when you right-click a folder aren't part of the Directory key but instead are part of the Folder key--specifically, they're a subbranch of HKEY_CLASSES_ROOT\Folder\shell. So, for example, if you installed the utility TreeSize that I discussed in last August's Windows Tips column, and now you don't want its command to appear on the context menu, export a backup file of the HKEY_CLASSES_ROOT\Folder\shell folder, as explained above. Then select and delete the treesize key.

To remove similar commands for other file types, follow a similar process, deleting the appropriate key inside the shell key for the specific file-type key. Unfortunately, finding the right file-type key isn't always easy. One method is to open Windows Explorer (or any folder window), select a file whose context menu has commands you want to remove, and press <Shift>-<F10> to see its context menu. Note how the command appears.

Now return to the Registry Editor, and select HKEY_CLASSES_ROOT to begin the search there. Choose Edit, Find and type the name of the command that you want to remove. Make sure that Data is checked in the 'Look at' section, and click Find Next. If you're lucky, you'll find the command within a key in the shell key of a given file type. File-type keys usually contain the extension in the name--for example, "txtfile" for files with the .txt extension. That should tell you if you're on the right track. As before, export the parent key (such as the shell key) for any keys you delete, in case you make a mistake and need to undo the damage. Then select the key nested within shell and press <Delete>.

More Registry revisions: In some cases, the same context-menu commands are present for multiple file types whose icons you may right-click. You can remove some of these commands by first opening the Registry Editor as described above, and navigating to and selecting HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers. Choose Registry, Export Registry File or File, Export Registry File to back up this section of the Registry, and then look for keys underneath this branch that correspond to the menu items you want to remove. For example, to delete the commands that Adobe Acrobat 6 adds to many file types, select the Adobe.Acrobat.ContextMenu key and press <Delete> (see FIGURE 4), or right-click it and choose Delete. To remove the 'Open With' submenu that appears on file context menus, delete that key. If you want to undo the action, merge your exported Registry-key file back into the Registry as explained in the previous tip.