以下内容来自MSDN:
This tutorial explains how to add a menu item that runs a Microsoft Windows application or that runs a script to the Tools menu or Help menu in Microsoft Internet Explorer. If you also want to create a toolbar button for the Microsoft Win32 application or script, see the Adding Toolbar Buttons tutorial.
Developers who want to add items to the Tools menu in Internet Explorer must be familiar with the registry.
This feature is only available in Internet Explorer 5 and later.
The steps in this section must be followed when adding any items to the Tools menu in Internet Explorer. If any of the required steps are omitted, the item will not be displayed in the Tools menu.
You can use Guidgen.exe from Microsoft Visual Studio, or Uuidgen.exe from the Windows Software Development Kit (SDK) .
{GUID} is the valid GUID that you created in step 1.
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\CLSID
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\MenuText
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\MenuCustomize
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\MenuStatusBar
To complete the setup of the custom command, you must provide details of the action that takes place when the menu item is selected. The values that you need depend on how the menu item is implemented. The following list contains links to the sections with the steps required to complete the addition of a menu item.
In order to invoke a Component Object Model (COM) object from Internet Explorer, it must implement IOleCommandTarget. Only one command is supported per object; the COM object's IOleCommandTarget::Exec is always called with nCmdID=0 and with VARIANT arguments set to NULL. Additionally, the implementation of IOleCommandTarget::QueryStatus is always called with cCmds=1.
If the COM object needs to access the browser or Dynamic HTML (DHTML) Object Model of the active page, it must implement IObjectWithSite. Internet Explorer calls IObjectWithSite::SetSite with a pointer to IShellBrowser.
The following steps are required to complete the creation of an item in the Tools menu that implements a COM object.
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\ClsidExtension
Set the value of ClsidExtension equal to the GUID of the COM object.
The following step is required to complete the creation of an item in the Tools menu that runs a script.
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\Script
Set the value of Script to the full path of the script to be run.
To add a toolbar button with the same functionality, see the Adding Toolbar Buttons tutorial.
The following step is required to complete the creation of an item in the Tools menu that runs an executable file.
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\Exec
Set the value of Exec to the full path of the .exe file to be run.
To add a toolbar button with the same functionality, see the Adding Toolbar Buttons tutorial.
开发参考文章:http://www.iteye.com/blogs/subjects/ray_linn2