I have written a toolbar that runs on the taskbar. Unfortunately, after it is installed, the user has to enable it manually. Is there a way to tell explorer to open (or close) a given toolbar?
I would like for the installer, NSIS, to turn on the toolbar when the installation is complete (I realize that a plugin would be necessary).
I also want to know if it's possible to automatically enable a toolbar for all users, for example in a corporate environment where multiple users would share a PC.
Edit: This code can now Add a deskband object (from Pinvoke.net, and these two MSDN forum questions):
And, an example use:
It would make sense that a similar call to RemoveBand would also do the trick, but as of yet, I can't get that code to work. Another issue: the added deskband closes when the application that added it closes.
I can't find the exact url right now, but I remember there being some discussion of this around PDC2008 where basically this was not enabled specifically so that random programs couldn't populate the taskbar w/o the users consent.
A side effect of this is that very few users even enable the WMP deskbar by default.
You might want to check out this article. It looks like you can only do this ("officially" anyway) in Vista using the ITrayDeskBand interface.
Not really an answer to your question, but please, please: do not write shell extensions (and a taskbar is a shell extension) in .NET!
Here's why.
Basically, you're breaking other apps.
From what I understand, taskbars locations and values etc are stored in the registry (forgot exact location) so if you find the specific registry key you could take its location and make your installer insert the registry key on the computer so the taskbar is enabled.
if you check well, google toolband exists while an exe is running behind (GoogleDesktop.exe) so if you insist on the way google or search bar are instantiated you should check again TrayBandSiteService and make a support exe...