how to use windows xp run dialog as search box

After seeing DI’s Open Your Favorite Websites Directly from Windows Vista Start post, I thought why not use Windows XP Run dialog box as a search box. So here is a simple trick that can enable you to open your favorite sites directly from XP’s run dialog box.

Using this trick you can type “g bbc” to directly open BBC website in firefox / IE.

First step is to create a batch file with the following text:

For Firefox users:
"C:\Program Files\Mozilla Firefox\firefox.exe" "http://www.google.com/search?btnI=I'm+Feeling+Lucky&q=%1"

For IE users:
"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://www.google.com/search?btnI=I'm+Feeling+Lucky&q=%1"

Save the file anywhere (preferably in C:\Program Files) with a name “g.bat”. The above one line of code essentially starts Firefox or IE and requests Google to fetch your favorite site using “I am feeling lucky” feature. The “%1″ towards end tells windows to get the first parameter followed by “g” and passes it to Google.

Before you can use this you just need to modify your environment variables. For this:

1. Right click on “my computer” and select properties
2. In the dialog box go to “advanced” tab and click on “environment variables” button
using_xp_run_as_search2
3. Select “path” from system variables and click “edit” button
using_xp_run_as_search3
4. Append “;C:\Program files” (if you have saved the batch file in some other directory mention that path here) to the path in the end (dont forget the ; before C: )
using_xp_run_as_search1
5. Click OK all the way back.

Now you can use run dialog box as Google search bar with “I am feeling lucky”, You can use the same trick to do searches on ebay, amazon, imdb, yahoo or wikipedia or anything else.


Do you like this post? Consider subscribing to my newsletter, every weekday I will send you one email with hot excel tips, technology tidbits or business insights that can make you more productive. Each mail will have unsubscribe link so you can stop receiving the mails at any time you wish.

Share some love, add this to StumbleSubscribe to PHD feed Get my Feed, its yummy