02 May
Posted by Chandoo as hacks, ideas, technology

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

3. Select “path” from system variables and click “edit” button

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: )

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.
Share some love, add this to Stumble
Get my Feed, its yummy
6 Responses
Hypnos`
May 4th, 2008 at 7:25 pm
1Thanks. I think I’d prefer to fire up a firefox/safari and just search using the in-built google bar.
Aren’t you using the macbook?
Sukhbinder Singh
May 5th, 2008 at 9:51 am
2Great tip? But instead of doing the environment variable thing. Just copy the g.bat that is the batch file in windows folder and you can run is without any other issue.
Thanks by the way. keep up the good work
Nikhil Narayanan
May 5th, 2008 at 10:10 am
3Hi Chandoo
Cool tip man!
Thanks..
What abt a batch file for opening 10 of my fav sites in one go on Mozilla..?
-Nikhil
Chandoo
May 5th, 2008 at 3:31 pm
4@Hypnos - oh yeah, you always have that option, btw, I use PC @ office, so ended up experimenting this…
@Sukhbinder Singh - welcome to PHD
We can always copy the batch file to system folders, often access to the folder may be limited based on user levels, thats why I mentioned program files or something like that. But good idea there
@Nikhil … oh sure, it would be the same way, just write 10 lines in the batch file instead of one and it works, alternatively if you are using firefox, you can change your options to load a bunch of bookmarks on start up.
Club ReM
May 14th, 2008 at 9:37 am
5Hola
Mi nombre es Javier Polo Pérez y soy Ingeniero, y desde hace varios años me dedico a la Informática de Gestión. He desarrollado varias soluciones informáticas que en el Mundo Hispano han obtenido una buena acogida debido a sus prestaciones y fácil manejo, muchos ya las conocerán sus nombres son: Clinicas @Clinic @OdontoClinic @PsicoClinic @PodoClinic @FisioClinic Inmobiliarias InmoServer Facturacion ProServer @GesPYME Comunidades AdmiCom Veterinarias @VetGes Promocion GesProm Prevencion PrevGes Almacen @GeSTOCK Personal @GesRRHH Turismo @GesTUR
Me gustaría comentar que tras un año de pelea con Windows Vista intentando adaptar mis programas a dicho sistema operativo, lo cual he conseguido con mucho esfuerzo, finalmente he vuelto con mi Windosw XP, por tanto si lo que desean es un sistema operativo estable que no de ni un solo problema lo recomiendo.
Si desean ver mi trabajo y descargarse mis programas en forma gratuita pueden acceder a la web del Club ReM su dirección es http://www.clubrem.es o en http://www.e-rem.net
Un Saludo
Javier Polo
Chris
May 20th, 2008 at 6:09 pm
6Hi,
I love this idea, what I would really like is to add this to the right click of a folder, e.g. look up movie names in imdb. By making a shortcut of your batch file in the “send to” menu it will pass to %1 but it passes the complete path.
Do you know of any way to pass just the folder name?
Cheers.
C.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Welcome :)
Quick Facts
I am Chandoo, when I started this blog in 2004, the purpose was to post snapshots from hell to share my b-school life with world.
Today this blog has over 600 articles in topics like Excel, Business, Advertising, Technology, Photography and Life in Indian B-schools.
Interested? Know more or mail me at: chandoo [dot] d [at] gmail [dot] com
Recent Comments
Categories
Recently PHD wrote
Monthly Archives
Category-wise Archives
Blogroll
PHD Link Love
Hungry for Spam
Disclaimer
Add PHD to your news reader
Tag Cloud
advertising b-school blogging business chennai company cost engineering excel experience food Friends fun game holiday Humor idea ideas IIM images India Indore information learning management marketing MBA money movie office photos presentation process product project service story technology tips train travel tricks tv web weekendPointy Haired Dilbert - Chandoo.org is proudly powered by WordPress - BloggingPro theme by: Design Disease