Search code examples
internet-explorerregistrybho

How to change Internet Explorer search assistant programmatically?


Folks,

I am developing Browser Helper Object, that has to change search assistant URL in Internet Explorer 6.

I have discovered on the web, that it can be done by writing new "Search assistant" value into registry "HKEYLOCALMACHINE\Software\Microsoft\Internet Explorer\Search". However when I write it manually nothing changes in IE behavior.

I'll appreciate any suggestions on this issue.


Solution

  • To set the Search Assistant URL (the one that appears by the side on clicking the IE6 Search Toolbar button) to a specific site, the registry entries are actually these:

    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
        Search Bar (REG_SZ, put the URL here)
        Use Custom Search URL (REG_DWORD, should be 1)
    

    Note that this doesn't change the search engine you use to search from the address bar. Microsoft appears (in XP SP2) to have hard-coded this to go to

    http://auto.search.msn.com/response.asp?MT=TheQuery&srch=4&prov=XXXX
    

    Where prov is something "approved" like msn, gogl, lyco, etc. You can set this 'prov' in

    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl
        provider (REG_SZ)