Partager via


Internet Explorer Client Registry Layout

Windows Internet Explorer supports user selection of Internet service applications, such as mail and news clients. This article describes how to make your Internet service applications available to Internet Explorer. The registry settings referred to in this article are supported in Microsoft Internet Explorer 4.0 and later, unless otherwise indicated.

Warning   Modifying the system registry can cause serious problems with your operating system; therefore, make sure to back up the registry before you begin, and know how to restore it if a problem occurs.

 

Programmatic access to the registry is beyond the scope of this article. Internet Explorer does not provide user interface functionality to interact directly with the registry.

This topic contains the following sections:

  • User Interface Support
    • File Menu Items
    • View Menu Items
    • Toolbar Buttons
    • Internet Options
  • Adding Client Applications
    • Adding an Email Client Application
  • Adding HTML Editors
    • Setting the Default HTML Editor
  • Selecting a View Source Editor

User Interface Support

This section describes the Internet Explorer menu options that allow the user to launch Internet service applications from the Internet Explorer user interface.

File Menu Items

Internet Explorer provides File menu commands that launch additional instances of Internet Explorer or Internet services that are not included as part of Internet Explorer. The Internet Explorer File menu offers users the ability to start a new Internet service—such as an e-mail message, newsgroup post, address book contact entry, or Internet conference call—and to send a link or page as e-mail to another Internet address.

Note   The Edit command on the File menu in Microsoft Internet Explorer 5 and later enables users to edit Web pages using the HTML editor they choose as their default.

 

View Menu Items

Internet Explorer provides the View Source command, which enables users to view the HTML source file for the current page. The View Source command is also available from the Web page's context menu. With Internet Explorer 5 and later, users may select editors other than Notepad for viewing source code.

Currently, this feature works with programs that permit spaces in the command path. WordPad, for example, does not permit spaces in the command path, so you cannot specify WordPad as your default editor for viewing source code.

Toolbar Buttons

HTML editors can also be launched from the toolbar by clicking the Edit button. Internet Explorer 4.0 launches Microsoft FrontPage or FrontPage Express, if installed, when the Edit button is pressed. The Edit button on the toolbar in Internet Explorer 5 and later also enables users to edit Web pages using their chosen HTML editor.

Internet Options

On Windows XP, Internet Explorer allows the user to select which application will be launched when accessing an Internet service, such as mail or news. Internet Explorer 5 and later also allows the user to select a default HTML editor. Internet Explorer uses the default client applications that are defined in the registry. Client applications are listed within a corresponding drop-down menu that relates to the client application type. Registered applications are listed in a drop-down menu on the Programs tab of the Internet Options dialog box. (The following screenshot is from Windows Internet Explorer 7.)

On Windows Vista, Internet Explorer no longer provides the ability for users to select which default applications handle their Internet services. Windows Vista with user account control (UAC) enabled does not allow applications to write to HKEY_LOCAL_MACHINE after install. Internet Explorer 7 uses the new Default Programs control panel to allow users to select the applications that handle their Internet services on a per-user basis. Users can still select their default HTML editors within Internet Explorer because this is already a per-user setting.

Adding Client Applications

Internet Explorer uses the registry to determine which clients to use and how to use them. By changing the values that are stored in the registry for extended services such as mail and news, it is possible for Internet Explorer to launch applications that provide specialized Internet services.

Note   In Windows 95 or later, Microsoft Windows NT 4.0, and Windows 2000 and later, the system registry contains the settings used by Internet Explorer to access the client services of other applications from within the browser. Internet Explorer establishes the default settings for these menu items during installation.

 

The Calendar, Contacts, Internet Call, Mail, and News registry settings can be found under the SOFTWARE\Clients subkey of HKEY_LOCAL_MACHINE.

Clients Subkey URL Protocol Description
Calendar   Calendar and scheduling applications
Contacts ldap: Address book and contact database applications
Internet Call callto: Internet conference applications
Mail mailto: Internet e-mail and messaging clients
News news:, snews:, nntp: Internet newsgroup clients

 

For more information about predefined and pluggable protocols, and how to implement a protocol handler, see Asynchronous Pluggable Protocols.

Adding an Email Client Application

The following example demonstrates how to include a mail client application in the list of available applications. These steps are virtually identical for each of the Internet service application types listed above.

  1. Create a new registry key for your Internet client application.

    HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\My_Mail_Client

  2. Define the client application to be launched by Internet Explorer.

    My_Mail_Client
       (Default) = My Mail Client Name
       shell
          open
             command
                (Default) = "%ProgramFiles%\MyMail\MyMailClient.EXE"
    

    Note  The standard ShellExecute rules for registry keys apply; the ddeexec subkey may also be used to open the application using a running dde service.

     

  3. Define the URL Protocol handlers implemented by this application.

    My_Mail_Client
       Protocols
          mailto
             (Default) = URL:MailTo Protocol
             URL Protocol = ""
             DefaultIcon
                (Default) = "%ProgramFiles%\MyMail\MyMailClient.EXE",-3
             shell
                open
                   command
                      (Default) = "%ProgramFiles%\MyMail\MyMailClient.EXE" /mail "%1"
    
  4. (Optional) List the file types and extensions recognized by your application.

    My_Mail_Client
       Protocols
          .mymsg
             (Default) = msg_file
             Content Type = message/rfc822
          msg_file
             (Default) = Internet Email Message
             DefaultIcon
                (Default) = "%ProgramFiles%\MyMail\MyMailClient.EXE",-7
             shell
                open
                   command
                      (Default) = "%ProgramFiles%\MyMail\MyMailClient.EXE" /open "%1"
    
  5. For e-mail client applications only, register a DLL (or executable) for handling the Simple MAPI calls needed by the Page by E-mail and Link by E-mail commands under the Send sub-menu of the File menu.

    My_Mail_Client
       DLLPath = C:\Program Files\MyMail\SimpleMAPI.dll
    

    Note   If the DLL Path value is present and the mail client has been selected as default, the DLL or EXE will be used. If the key is not present, the DLL or EXE associated with the CMCDLLName32 name/value pair in the [Mail] section of the Win.ini file will be used. If the Win.ini entry is not present, Mapi32.dll will be used.

     

  6. (Optional) Set the new entry as the default e-mail client application.

    HKEY_LOCAL_MACHINE
       SOFTWARE
          Clients
             Mail
                (Default) = My_Mail_Client
    

Once the registry is modified to include the new mail client application, Internet Explorer adds "My Mail Client Name" to the drop-down list of available e-mail applications. From this list, users can specify the mail client they want to be their default e-mail application. When the user selects the New Message item from the File menu, or one of the menu items available from the Mail toolbar button, Internet Explorer launches the application that the user has specified.

For additional information on how to register a browser, e-mail, media playback, or instant messaging program in the Windows registry, see Registering Programs with Client Types.

Adding HTML Editors

The steps for adding HTML editors to the drop-down list on the Programs tab of the Internet Options dialog box in Internet Explorer 5 and later are slightly different than the steps for adding client applications like mail and news.

  1. Register the HTML editor in the OpenWithList file type association of .htm files.

    HKEY_CLASSSES_ROOT
       .htm
          OpenWithList
             MyEditor.exe
    
  2. Add shell, edit, and command subkeys to the editor's HKEY_CLASSES_ROOT\Applications registry entry. The "%1" parameter refers to the file name of the active Web page.

    HKEY_CLASSES_ROOT or HKEY_CURRENT_USER
       Applications
          MyEditor.exe
             shell
                edit
                   FriendlyAppName = My HTML Editor
                   command
                      (Default) = "%ProgramFiles%\MyHTML\MyEditor.exe" "%1"
    

    Note   The edit subkey is required. If the FriendlyAppName value is missing, the application itself is queried for this information.

     

Close and reopen the browser for these changes to take effect.

Setting the Default HTML Editor

In Internet Explorer 5 or later, whenever the HTML editor is selected from the drop-down list on the Programs tab of the Internet Options dialog box, the Edit with... command on the File menu is updated to reflect the selection.

HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER
   Software
      Microsoft
         Internet Explorer
            Default HTML Editor
               Description = My HTML Editor
               shell
                  edit
                     command
                        (Default) = "%ProgramFiles%\MyHTML\MyEditor.exe" "%1"

Note   Applications such as FrontPage check this key to determine if they are registered as the default HTML editor.

 

Selecting a View Source Editor

By default when you use the View Source feature of Internet Explorer it launches Notepad as the text editor. The following registry key will allow another source editor to be used:

HKEY_LOCAL_MACHINE
   Software
      Microsoft
         Internet Explorer
            View Source Editor
               Editor Name
                  (Default) = C:\Program Files\MyHTML\MyEditor.exe

Note   Changes to this registry value take effect immediately. No environment variables (such as %ProgramFiles%) or command line arguments are allowed. The filename of the cached HTML file is passed as the first argument on the command line.

 

Note   The View Source Editor key is not present in Internet Explorer 7 by default and will need to be created.