Customizing Internet Explorer

Windows XP comes with Internet Explorer 6. IT professionals can customize Internet Explorer in a number of ways using the Internet Explorer Administration Kit. This tool is available at http://www.microsoft.com/downloads, and it also comes with the Office XP Resource Kit. You can do the following with the kit:

  • Tailor Internet Explorer and other Internet components to fit the needs of your enterprise or users. For example, you can customize the Links bar and Favorites menu to promote your intranet or provide helpful information.

  • Configure and deploy settings without ever touching desktops.

  • Customize the setup program so that it requires little or no user interaction.

  • Control which settings users can change so that IT professionals can ensure that security, connection, and important settings stick to corporate standards.

For more information about the Internet Explorer Administration Kit, see http://www.microsoft.com/windows/ieak/default.asp. The following sections describe a few of my favorite customizations for Internet Explorer, including extending its shortcut menus, changing the toolbar's background, and adding search URLs to it.

Extending the Shortcut Menus

Right-click a Web page, and Internet Explorer displays a shortcut menu. You can customize this shortcut menu by adding commands to it that you link to scripts in an HTML file. For example, you can add a command to the shortcut menu that opens the current Web page in a new window or highlights the selected text on it.

HKCU\Software\Microsoft\Internet Explorer\MenuExt is where Internet Explorer looks for extensions. Add this key if it doesn't exist, and then add a subkey for each command that you want to add. Then set that subkey's default value to the path and name of the HTML file containing the script that carries out the command. For example, to add the command Magnify to the shortcut menu that runs the script in the HTML file C:\Windows \Web\Magnify.htm, add the subkey Magnify and set its default value to C:\Windows\Web\Magnify.htm. When you choose this command on Internet Explorer's shortcut menu, it executes the script that the file contains. Then you need to create Magnify.htm. The following listing is the contents of Magnify.htm. external.menuArguments is a property that contains the window object in which you executed the command. Because you have access to the window object, you can do almost anything you like in that window, such as reformatting its contents, and so on.

Listing 4-6: Magnify.htm

start example

 <HTML> <SCRIPT LANGUAGE="JavaScript" defer> var objWin = external.menuArguments; var objDoc = objWin.document; var objSel = objDoc.selection; var objRange = objSel.createRange(); objRange.execCommand("FontSize", 0, "+2"); </SCRIPT> </HTML> 

end example

You can configure the shortcut menus to which Internet Explorer adds your command. In the subkey you created for the extension, add the REG_DWORD value Contexts, and apply the bit masks shown in Table 4-5 (on the next page) to it. For example, to limit the previous example so that Internet Explorer displays it only for text selections, add the REG_DWORD value Contexts to Magnify, and set it to 0x10.

Table 4-5: Internet Explorer Menu Extensions

Bit mask

Menu

0x01

Default

0x02

Image

0x04

Control

0x08

Table

0x10

Text Selection

0x11

Anchor

0x12

Unknown

Note 

If you're interested in learning more about extending Internet Explorer, you should check out Microsoft's documentation for extending the browser. You find it at http://msdn.microsoft.com/workshop/browser/ext/overview/overview.asp. This requires proficiency with writing scripts and HTML, though.

Changing the Toolbar Background

You can customize the background you see on Internet Explorer's toolbar. It's just a bitmap. To change the background, create a REG_SZ value called BackBitmap in HKCU\Software\Microsoft\Internet Explorer\Toolbar. Set this value to the path and name of the bitmap file you want to see in the toolbar's background. Internet Explorer tiles the bitmap horizontally and vertically to fill the toolbar.

Customizing Search URLs

Search URLs are a convenient way to use different Internet search engines. For example, you might have a search URL called news that searches Google Groups. Type news Jerry Honeycutt in the address bar to automatically search Google Groups for all UseNet articles that contain the words Jerry and Honeycutt.

HKCU\Software\Microsoft\Internet Explorer\SearchURL is where you create search URLs. If you don't see this subkey, create it. Then add a subkey for each search prefix you want to use. To use the example I just gave, create the subkey news. Set the default value of the prefix's subkey to the URL of the search engine. Use %s as a placeholder for the search string. Internet Explorer replaces the %s with any text you type to the right of the prefix. Continue the example, and set it to http://groups.google.com/groups?q=%s&hl=en.

Add the REG_SZ values shown in Table 4-6 to the prefix key you created. The purpose of these values is to describe what to substitute for special characters in your search string, including a space, percent sign (%), ampersand (&), and plus sign (+). These characters have special meaning when submitting forms to Web sites, so you must substitute a plus sign for a space, for example, or %26 for an ampersand. Thus, the browser translates the string Ben & Jerry to Ben+%26+Jerry.

Table 4-6: Values in Search URLs

Name

Data

<space>

+

%

%25

&

%26

+

%2B

Deriving the URL that you must use is easy. Open the search engine that you want to add to Internet Explorer's search URLs, and then search for something. When the browser displays the results, copy the URL from the address bar, replacing your search word with a %s. For example, after searching Google Groups for sample, the resulting URL is http://groups.google.com/groups?q=sample&hl=en. Replace the word sample with %s to get http://groups.google.com/groups?q=%s&hl=en.

This hack is so useful that I have a script that automatically creates search URLs for the search engines I use most often. Copy the following listing to the file Search.inf, right-click it, and then click Install. You can remove this script and all its settings using Add Or Remove Programs. This script creates search URLs for the five search engines that I use most often. The search URL news searches Google Groups; msn searches MSN; ms searches Microsoft's Web site; msdn searches MSDN; and technet searches TechNet.

Listing 4-7: Search.inf

start example

 [Version] Signature=$CHICAGO$ [DefaultInstall] AddReg=Reg.Settings AddReg=Reg.Uninstall CopyFiles=Inf.Copy [DefaultUninstall] DelReg=Reg.Settings DelReg=Reg.Uninstall DelFiles=Inf.Copy [Reg.Settings] HKCU,Software\Microsoft\Internet Explorer\SearchURL HKCU,Software\Microsoft\Internet Explorer\SearchURL\news,,0,"%GOOGLE%" HKCU,Software\Microsoft\Internet Explorer\SearchURL\news," ",0,"+" HKCU,Software\Microsoft\Internet Explorer\SearchURL\news,"%",0,"%25" HKCU,Software\Microsoft\Internet Explorer\SearchURL\news,"&",0,"%26" HKCU,Software\Microsoft\Internet Explorer\SearchURL\news,"+",0,"%2B" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msn,,0,"%MSN%" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msn," ",0,"+" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msn,"%",0,"%25" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msn,"&",0,"%26" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msn,"+",0,"%2B" HKCU,Software\Microsoft\Internet Explorer\SearchURL\ms,,0,"%MICROSOFT%" HKCU,Software\Microsoft\Internet Explorer\SearchURL\ms," ",0,"+" HKCU,Software\Microsoft\Internet Explorer\SearchURL\ms,"%",0,"%25" HKCU,Software\Microsoft\Internet Explorer\SearchURL\ms,"&",0,"%26" HKCU,Software\Microsoft\Internet Explorer\SearchURL\ms,"+",0,"%2B" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msdn,,0,"%MSDN%" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msdn," ",0,"+" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msdn,"%",0,"%25" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msdn,"&",0,"%26" HKCU,Software\Microsoft\Internet Explorer\SearchURL\msdn,"+",0,"%2B" HKCU,Software\Microsoft\Internet Explorer\SearchURL\technet,,0,"%TECHNET%" HKCU,Software\Microsoft\Internet Explorer\SearchURL\technet," ",0,"+" HKCU,Software\Microsoft\Internet Explorer\SearchURL\technet,"%",0,"%25" HKCU,Software\Microsoft\Internet Explorer\SearchURL\technet,"&",0,"%26" HKCU,Software\Microsoft\Internet Explorer\SearchURL\technet,"+",0,"%2B" [Reg.Uninstall] HKCU,Software\Microsoft\Windows\CurrentVersion\Uninstall\%NAME% HKCU,Software\Microsoft\Windows\CurrentVersion\Uninstall\%NAME%,DisplayName\ ,,"%NAME%" HKCU,Software\Microsoft\Windows\CurrentVersion\Uninstall\%NAME%,UninstallString\ ,,"Rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132"\ "%53%\Application Data\Custom\Search.inf" [Inf.Copy] Search.inf [DestinationDirs] Inf.Copy=53,Application Data\Custom [SourceDisksNames] 55=%DISKNAME% [SourceDisksFiles] Search.inf=55 [Strings] NAME      = "Jerry's IE Search URLs" DISKNAME  = "Setup Files" ; Search URLs GOOGLE    = "http://groups.google.com/groups?q=%s&hl=en" MSN       = "http://search.msn.com/results.asp?RS=CHECKED&FORM=MSNH&v=1&q=%s" MICROSOFT = "http://search.microsoft.com/default.asp?so=RECCNT&siteid=us&p=1&"\ "nq=NEW&qu=%s&IntlSearch=&boolean=ALL&ig=1&ig=3&ig=5&ig=7&ig=9&ig=2&ig=4&ig=6&"\ "ig=8&ig=10&i=00&i=02&i=04&i=06&i=08&i=01&i=03&i=05&i=07&i=09" MSDN      = "http://search.microsoft.com/default.asp?qu=%s&boolean=ALL&nq=NEW&"\ "so=RECCNT&p=1&ig=01&i=00&i=01&i=02&i=03&i=04&i=05&i=06&i=07&i=08&i=09&i=10&"\ "i=11&i=12&i=13&i=14&i=15&i=16&i=17&i=18&i=19&i=20&i=21&i=22&i=23&i=24&i=25&"\ "i=26&i=27&i=28&i=29&i=30&i=31&i=32&i=33&i=34&i=35&i=36&i=37&i=38&i=39&i=40&"\ "i=41&i=42&i=43&i=44&i=45&i=46&i=47&i=48&i=49&i=50&i=51&siteid=us/dev" TECHNET   = "http://search.microsoft.com/default.asp?qu=%s&boolean=ALL&nq=NEW&"\ "so=RECCNT&p=1&ig=01&ig=02&ig=03&ig=04&i=00&i=01&i=02&i=03&i=04&i=05&i=06&i=07&"\ "i=08&i=09&i=10&i=11&i=12&i=13&i=14&i=15&i=16&i=17&i=18&i=19&i=20&i=21&i=22&"\ "i=23&i=24&i=25&i=26&i=27&i=28&i=29&i=30&i=31&i=32&i=33&i=34&i=35&i=36&i=37&"\ "i=38&i=39&siteid=us/itresources" 

end example



Microsoft Windows XP Registry Guide
Microsoft Windows XP Registry Guide (Bpg-Other)
ISBN: 0735617880
EAN: 2147483647
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net