Saturday, March 24, 2007

Google Search in IE 6

There are several ways to change your search engine. You could just click search and change it. You can use the IE 6 deployment tool to change it and then push it out to your computers. But that seems to only affect the search bar. What happens if you want to change it in the address bar as well. Here is a vbscript that you easily change to a reg file. Either way you can push it through SMS to your clients. I really don't know why I did this a vbscript and not a reg file. I guess I was looking to see what I could do with VBS and the registry. When this is run per user it will set their search default to Google but it will also change the address bar into a google search. No need for the Google tool bar.

Dim objShell, RegLocate
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next

'Set Search Assistant

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Use Search Asst"
objShell.RegWrite RegLocate,"yes","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Search Page"
objShell.RegWrite RegLocate,"","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Search Bar"
objShell.RegWrite RegLocate,"","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchURL\"
objShell.RegWrite RegLocate,"","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchURL\provider"
objShell.RegWrite RegLocate,"gogl","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\search Assistant\DefaultSearchURL"
objShell.RegWrite RegLocate,"","REG_SZ"