Internet Explorer Toolbars how-to

Have you ever tried to create an IE Toolbar? Recently, my friends at www.globalscore.com asked how difficult it would be to create an IE Toolbar with a live scores ticker.

Well, at first I thought “oh shit, I bet I’ll have to play with the Shell Extentions again, possibly with VB (bliah), or even worse .. C++ ( cool, but … can’t really be bothered writting VC++ code again :( ).

Anyway, I forgot the issue for some time, until yesterday i thought … might as well take a look around to see exactly what the process is.

Apparently, if you only wanna show some HTML page from somewhere in your toolbar ( the guys already had a ticker page that they give out to other web sites ), things are pretty easy! A few registry entries will do the trick very nicely. It actually took me about 20 minutes to locate the information, build the registry entries and install the new ticker toolbar :)

The how-to:

First thing you have to do, is create a GUID. You can do that very easily with guidgen.exe if you have Visual Studio. My GUID was {86FB4A4F-BAC1-46f4-9022-7FDC8B59F528}.

Then, create a .reg file, containing the following lines:


Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{86FB4A4F-BAC1-46f4-9022-7FDC8B59F528}]
@="GlobalScore Ticker"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{86FB4A4F-BAC1-46f4-9022-7FDC8B59F528}\Implemented Categories]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{86FB4A4F-BAC1-46f4-9022-7FDC8B59F528}\Implemented Categories\{00021494-0000-0000-C000-000000000046}]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{86FB4A4F-BAC1-46f4-9022-7FDC8B59F528}\InProcServer32]
@="C:\\WINDOWS\\SYSTEM32\\SHDOCVW.DLL"
"ThreadingModel"="Apartment"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{86FB4A4F-BAC1-46f4-9022-7FDC8B59F528}\Instance]
@=""
"CLSID"="{4D5C8C2A-D075-11d0-B416-00C04FB90376}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{86FB4A4F-BAC1-46f4-9022-7FDC8B59F528}\Instance\InitPropertyBag]
"Url"="http://www.globalscore.com/ticker.php"

If you merge this file to your registry and open up IE, under View -> Explorer Toolbar you’ll see my little ticker toolbar, called “Globalscore Ticker”. Check it, and it’ll show a nice little toolbar on the bottom of your IE window, with the ticker page displayed inside it. As simple as that.

I tried it out on my machine, and it worked like a charm. So, I sent it to Ellis, one of the guys to try it out himself before I build an installer for it. He came back to me saying that it sisn’t work. It registered the toolbar, but if you opened it in IE an empty gray toolbar appeared :(

Well, the answer was simple. Ellis used Win2K. If you take a closer look at the above code, you’ll see that a path to shdocvw.dll is specified somewhere. My file contained “C:\windows\system32\shdocvw.dll”, but in Win2K there is no Windows directory. There is a WinNT dir instead ;) Replace that, and it works like a charm on Win2K as well :)

So, next I built an installer project that detects which OS you’re running and sets the path correctly. That worked for all of us … for a while :)

One machine, with Win XP on it didn’t respond too well. It didn’t show the content. Why oh why?? … well … the guy had his Windows installed on D:\Windows … :P … duuhh !!!!

So, the next installer locates the DLL, and sets the path correct on any case ;)

There you have it then. If you ever wanna create an IE Toolbar, create your little registry files, and build an installer that looks for the DLL and replaces the path value and you’re go!

Have a very nice day ;)

P.S. Just in case you ever wanna know what football matches are on anywhere in the world right now, don’t forget to visit http://www.globalscore.com to get the latest up-to-the-minute info! ;)

4 Responses to “Internet Explorer Toolbars how-to”

  1. Ellis Says:

    Ellis is one happy bastard right now!!!

  2. Gnwstos sou! Says:

    Uninstall ?????

  3. Gnwstos sou! Says:

    …uninstall - continued -;

    do you simply delete the keys from the registry ??

  4. Administrator Says:

    The installer should remove the keys from the registry automatically upon un-installation. Otherwise, yes, remove the keys from the registry