Thursday, March 29, 2007

XPe tip #6: Completely hide the Taskbar

On embedded XP we often (almost always) want to customize shell UI. The best way to do that is to get rid of Explorer shell and implement your own custom shell application. But if you don't have enough skills to write often a complex application, or you simply don't have enough time to do so, or, worse, Explorer shell must be running in order to get some functionality out of the box. Many examples to this have been posted to the XPe newsgroup, e.g. Autoplay feature.
So, what if you must have Explorer shell running but you still have to lock down OS and avoid users messing with files on disk and etc.
You can always have your own application running in full screen mode and covering all other windows from Microsoft (Desktop, Taskbar, etc.). But we all know that even with a proper Group Policy setup you won't be able to completely hide everything. There may also be cases where Taskbar will be showing up on the top of all other windows in the system regardless of the system settings. Only cure is to get control in your hands and completely hide the Taskbar (no, don't kill it - you still need Explorer's functionality). Here the tricks I came up with for hiding Taskbar.

First of all, lets pre-setup in TD the auto-hiding behaviour of the Taskbar. Although it sounds easy - just set the right registry flag - but it is not. For most Taskbar and some Start Menu options the Explorer keeps the settings stored as a set of bits in some registry values. Certainly, those bits are not documented. No problem, we always have helpful Regmon and by spending a little bit of time you'll figure out the interesting registry entry is [HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2],"Settings". As I mentioned earlier, it is a binary structure. Long time ago I posted a script on that changed the right bits of that value to make the Taskbar auto-hiding enabled. The readme of that posting would explain how to launch the script properly and set it up in TD.

Now lets go deeper and just disable the Taskbar once and for all.
What you want to do here is just create and compile a simple app that makes a call to FindWindow() on "Shell_TrayWnd" window class name and then just do a ShowWindow(SW_HIDE) for this window handle. The same you should do with "Progman" and Desktop windows. You better also disable the windows (EnableWindow(FALSE)) before hiding.

I actually do have this app written. The code is far from bring production quality (it was just an experiment, after all!) but I will share it with you, folks, as soon as I get my hands on that drive (I took it out and put it on a shelf here quite a while ago). Will do that very soon, I think.


mciatt said...

Hello, I am trying to locate your script which hides the taskbar on But it seems the link to that script is broken. Could you please email it to Much appreciated. Thanks.

Anonymous said...

When I start my post-FBA image, the Start Menu appears and has focus. I dont want it to.

Any idea why the start menu is activated on startup?

Anonymous said...

29047126483369175 I play dofus Replica Watches for one year, I Replica Rolex Watches want to get some Replica Watch kamas to buy Replica Chanel Watches item for my character. So, I search "Replica Swiss Watches" on google and found many website. As Exact Replica Graham Watch the tips from the forum, I just review the Swiss Replica Watches websites and choose some Replica Montblanc Watches quality sites to Replica Cartier Watches compare the price, and go to their Replica Breguet Watches online support to make Replica Breitling Watches the test. And Last Chaos Gold I decide to use Replica BRM Watch at the end. And Tag Heuer Replica Watch that is the Replica IWC Watch beginning..

Anonymous said...

My review Catatanku Noticia Orient Inspiration Automotive Audio Video Business Computer Entertainment My Note Duniasoer mem 73

Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.
Oes Tsetnoc | Semangat Mengembalikan Jati Diri Bangsa