Programming4us
         
 
 
Windows

Windows 7 : Using Any Search Engine from the Address Bar

10/17/2010 4:41:15 PM
Searching via the Search box is often easier than visiting the search engine’s site directly, but you’re limited to using either the default search engine or some other search provider that you’ve added to Internet Explorer. But what if you regularly use several search engines, depending on the search text or the results you get? In that case, it’s possible to set up address bar searching for any number of other search engines.

To see how this works, let’s run through an example. Follow these steps to set up address bar searching for Google:

1.
Select Start, type regedit, press Enter, and then enter your UAC credentials. (In Windows XP, select Start, Run, type regedit, and click OK.) The Registry Editor appears.

2.
Navigate to the following key:

HKCU\Software\Microsoft\Internet Explore\SearchURL

3.
Create a new subkey. The name of this subkey will be the text that you enter into the address bar before the search text. For example, if you name this subkey google, you’ll initiate an address bar search by typing googletext, where text is your search text.

Tip

I suggest using subkey names that are as short as possible to minimize typing. For example, I use the name g for my Google key (meaning that I can search by typing gtext into the address bar).

4.
Select the new subkey and double-click its (Default) value for editing.

5.
Type the URL that initiates a search for the search engine, and specify %s as a placeholder for the search text. For Google, the URL looks like this:

http://www.google.com/search?q=%s

6.
You also have to specify the characters or hexadecimal values that Internet Explorer substitutes for characters that have special meaning within a query string: space, pound sign (#), percent (%), ampersand (&), plus (+), equal (=), and question mark (?). To do this, add the following settings to the new subkey. Note that these values work with all search engines.

NameTypeData
<space>REG_SZ+
#REG_SZ%23
%REG_SZ%25
&REG_SZ%26
+REG_SZ%2B
=REG_SZ%3D
?REG_SZ%3F

Figure 1 shows a completed example. The text that you type into the address bar before the search string—that is, the name of the new subkey—is called the search prefix.

Figure 1. A sample search prefix for the Google search engine.


How do you know the proper URL to use for a search engine? Go to the search engine site and run a search with a single word. When the results appear, examine the URL in the address bar, which usually takes the following general form:

ScriptURL?QueryString

Here, ScriptURL is the address of the site’s search script, and QueryString is the data sent to the script. In most cases, you can just copy the URL and substitute %s for your search text when you set up your search prefix. I often experiment with reducing the query string to the minimum necessary for the search to execute properly. For example, a typical Google search might produce a URL such as the following:

http://www.google.com/search?rls=ig&hl=en&q=mcfedries&btnG=Search

In the query string, each item is separated by an ampersand (&), so I delete one item at a time until either the search breaks or I’m down to the search text (q=mcfedries in the earlier query string). To save you some legwork, the following are the minimal search URLs for a number of search sites:

All the Web:

http://www.alltheweb.com/search?query=%s&cat=web

AltaVista:

http://www.altavista.com/web/results?q=%s

AOL Search:

http://search.aol.com/aolcom/search?query=%s

Ask.com:

http://www.ask.com/web?q=%s

Encarta (Dictionary only):

http://encarta.msn.com/encnet/features/dictionary/DictionaryResults.aspx?search=%s

Encarta (General):

http://encarta.msn.com/encnet/refpages/search.aspx?q=%s

Excite:

http://msxml.excite.com/info.xcite/search/web/%s

Live.com:

http://www.live.com/?q=%s

Lycos:

http://search.lycos.com/default.asp?query=%s

Technorati:

http://www.technorati.com/search/%s

Yahoo!:

http://search.yahoo.com/bin/search?p=%s

Other -----------------
- Windows 7 : Understanding Internet Explorer Advanced Options
 
 
Most View
- Protecting SQL Server Data : CELL-LEVEL ENCRYPTION - Views and Stored Procedures (part 2) - Creating the Stored Procedures
- BizTalk 2010 Recipes : Business Rules Framework - Deploying and Undeploying Policies
- Windows Phone 7 : Finding Places and Things
- Windows Azure Service Life Cycle
- SQL Server 2008 : Developing Custom Managed Database Objects (part 5) - Developing Managed User-Defined Aggregates
- Windows 7 : Setting Up User Security - Renaming Built-In Accounts for Better Security
- Programming WCF Services : The Response Service (part 4) - Transactions
- SharePoint 2010 : Specify the Order of the Columns in a View
- Auditing an Existing Site to Identify SEO Problems (part 1 - Elements of an Audit
- Performing Administrative Tasks Using Central Administration (part 26) - External Service Connections
Top 10
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 3) - Configuring Recipient Filtering
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 2)
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 1)
- Implementing Edge Services for an Exchange Server 2007 Environment : Installing and Configuring the Edge Transport Server Components
- What's New in SharePoint 2013 (part 7) - BCS
- What's New in SharePoint 2013 (part 6) - SEARCH
- What's New in SharePoint 2013 (part 6) - WEB CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 5) - ENTERPRISE CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 4) - WORKFLOWS
- What's New in SharePoint 2013 (part 3) - REMOTE EVENTS