Larry Osterman's WebLog

Confessions of an Old Fogey
Blog - Title

Applet Mitigations - Notification Area Handlers

Applet Mitigations - Notification Area Handlers

  • Comments 21

First off (as always), reconsider your need for a notification area handler.  Seriously consider if it's appropriate for your application to have a notification area handler.  Do you really believe that it provides sufficient functionality to justify taking up limited notification area real-estate?  Really?

From what I've seen, some notification area handlers are quite well thought out and provide easy access to useful information or commonly accessed functionality (the volume, clock, taskmgr, "safely remove hardware" and RSS Bandit are ones come to mind).  Some have questionable value (the network and outlook handlers come to mind), some just don't seem to make sense at all (Quicktime and handlers like the various display driver and printer control panel notification area handlers)[1].  After all, do think that your customers really need to know how much ink remains in their printer all the time?

As I've mentioned in earlier articles, you should always have a mechanism for disabling your notification area handlers - it's just polite (and if you don't, your customer's are going to find other ways of disabling your notification area handlers).  Since you're building a mechanism to disable your notification area handler, why not specify it as a checkbox in your installer?  That way your customer never gets annoyed in the first place.  In addition (and I've also mentioned this before), make sure that your notification area handler is instanced on a per-user basis.  That way you (a) don't require elevation to disable your notification area handler, and (b) you let the various users of the computer make a choice - some may choose to use your applet, others may not.

 

If you've decided that you MUST have a notification area handler, then why chew up an entire process to handle it?  Windows offers a number of mechanisms to let you reduce the impact of your handler (it doesn't remove the impact, just reduces it).  For instance, you can use the task scheduler (mentioned earlier in my post about updaters) facility to launch your notification handler upon user logon - that provides a centrally manageable interface to allow for task control.  On Vista, you can define your task as firing a COM handler, in which case your applet gets launched in a hosting process - that means that instead of having a dedicated process, you live in a process that's shared with other jobs (including other notification area handlers).

One final thing about notification area handlers: If you don't have anything to say, shut up :)!  People get really annoyed by notification area icons, one way to reduce their ire is to simply not register an icon unless you have something to say.  You can see the effect of this with Windows Defender - they only insert their notification area icon if they need to alert the user, otherwise they're mute.  There's a huge caveat with this though: adopting this behavior can have unintended consequences.  When the Defender team adopted this behavior (only showing the icon if there was a problem), they received a flurry of complaints from users because they felt that if the icon wasn't present, defender somehow wasn't working.  As a result of this, the defender team added an option (off by default) to add their icon in the notification area all the time.  Personally, I think that people believe this way because they've been conditioned by poorly written notification area handlers so that they believe they're not protected unless they see the little icon, even though the icon has nothing to do with their protection level.

Next: Mitigations for services.

[1] As always, please remember my definition of crap: "Crap is defined as stuff I don't want running on my machine" - you may very well disagree with my opinions about the relative usefulness of the various applets I've listed above.

  • Leo: The outlook icon is annoying. In fact, if you go into the help and ask "hide notification area icon" it actually shows you how to set it to "Always Hide" in the notification area properties!!

    Still, I use it so that I can set Outlook to "Hide when minimized" so at least it's not eating up a whole taskbar button most of the time...

  • Thursday, August 23, 2007 5:46 AM by Leo Davidson

    > Safely Remove Hardware is nice, except that with some SATA

    > drivers all of your harddrives are considered hotplug (like I'm

    > about to open my PC up and unplug the system drive!)

    Or like you're about to disconnect a cable and unplug a drive, just like you can do with USB drives?  Depending on the method of connection, SCSI and I think 1394 could be detached dynamically too.  Even plain ATA can be detached, if the BIOS tells Windows in some manner -- and the BIOS can lie about it too.  I think this is one place where we shouldn't blame Windows.  When Windows displays that icon, it's doing that part of the job correctly.

  • Norman, I agree that it's correct for Windows (and/or the SATA drivers) to be putting my SATA drives in the Safely Remove list. Technically they can be hot-swapped.

    The problem I have is that neither Windows nor the SATA drivers seem to have a way to exclude devices that I never want to remove from that list. It means the icon is always there and that when I use it I risk doing something very bad by mistake.

    It's not the end of the world (and at least approaching off-topic so I'll shaddup now :)) but there's definitely room for improvement there. Just needs a registry setting or something where you can specify drive letters or devices which should be excluded from the list, I think.

  • Saturday, August 25, 2007 7:45 AM by Leo Davidson

    > neither Windows nor the SATA drivers seem to have a way to

    > exclude devices that I never want to remove from that list

    Aha, I see.  Yes, it would be nice to have a clickable checkbox or two in Device Manager to say "I don't want to remove this device even if the BIOS says I can" and maybe "I want to be able to remove this device even if the BIOS says I can't, because I know where the cable plugs into the jack".

    And come to think of it, yeah I saw one weird PC where that icon offers permission to remove the hard drive (system partition = boot partition = C partition, one 12GB hard drive, it's an old machine) but doesn't offer permission to remove the DVD drive (but pull a lever and it pops out).  Now I want to try doing it  ^_^

  • You can't remove system drive. But that icon is kind of pointless. I just bought card reader which registers itself as a mass storage device with four drive letters (it has four slots).

    Windows neatly offers me to remove them even though those four "drives" themselves are not removable -- multimedia cards are!

    So many design flaws, everywhere you turn there is at least one.

  • Norman: my language bar is one icon in the taskbar, as it was in XP and is in Vista; I don't know you have yours set up but in my options are: docked in the taskbar, show additional language icons unchecked (probably this is the option you want; i know it's a tough one).  Minimize and right-click the language bar and play around.

Page 2 of 2 (21 items) 12