How long does it take for a notification icon to stop appearing in the Notification Area Icons control panel?


A customer reported that even after uninstalling their application, the notification icon entry remains in the Notification Area Icons control panel.

Yup, that's right. Explorer remembers the icon, even after the underlying program has been uninstalled, because you might have uninstalled it with the intention of immediately reinstalling it, so Explorer remembers the icon in case it comes back. But after one week, Explorer gives up and finally forgets about the icon. "It's been a week, and the user hasn't reinstalled the application. I'm going to give up waiting for it."

The customer wanted to know how they could remove their icon immediately upon uninstall. They reported that having the icon remain in the Notification Area Icons control panel made it appear that the uninstall was unsuccessful.

There is no documented mechanism for removing the icon (and the undocumented mechanisms destroy all the icon history, not just the icon history for your icon, so don't do that either). You'll just have to wait seven days for the icon to go away.

(One possibility that was considered was to have the Notification Area Icons control panel check if the application is still installed before showing it on the list. This runs into problems, though, if the application resides on the network or removable media. It means that opening the Notification Area Icons control panel can stall on network I/O, generate security audits if you lost access to the network share, and spin up external media. Remember how much people hated it when Windows 95 spun up your CD-ROM drive the first time you clicked on the address bar?)

Comments (31)
  1. alegr1 says:

    You'll just have to wait seven days for the icon to go away.

    But if you turn away for a moment, a girl will crawl out of the monitor and kill you.

  2. Sam says:

    I hate it when my DVD drive spins up whenever something opens My Computer as part of a folder/file selection dialog operation, why don't they just stop that? 99% of the time i don't want to open the disk, and when i do it typically takes a few seconds to open anyway.

  3. Adam Rosenfield says:

    You could ask users to set their clocks ahead by a week, wait a little bit to let it sink in, and then them back to the correct time.  But I wouldn't do this automatically, since as well know well by now, using a global solution to solve a local problem is fraught with peril.

  4. alegr1 says:

    I hate it when my DVD drive spins up whenever something opens My Computer as part of a folder/file selection dialog operation,

    That's because AUTORUN.INI sets an icon for that DVD, and the icon is in an application linked with /SWAPRUN:CD

  5. dave says:

    The uninstall-some-software case seems common enough that it should have been catered for, surely?  Leaving the icon around after uninstallation violates the principle of least astonishment in a fairly major way.  

    And for what? Some weird optimization to "benefit" someone doing an uninstall-install sequence. Why would someone do that in any case? I can think of: (a) upgrading software that can't do upgrades properly, (b) fixing something that's broken.

    In case (a) why assume that the previous icon is still valid?

    In case (b) why assume that the icon behaviour/state isn't the thing that's broken?

    Perhaps I'm missing something, but I'm at a loss to determine why this was ever considered a good idea.

  6. jader3rd says:

    If the application which caused the notification to be removed resides on the network, or removable media, it doesn't seem unreasonable to check the respective location to see if that single item still exists.

    [And then you have the bug "How come Explorer keeps forgetting my notification icon settings?" (Answer: Because the network share was unavailable for 30 minutes last Sunday / the removable drive was removed, so Explorer thought the app was uninstalled.) -Raymond]

  7. mschaef says:

    For a while, I had a CD changer installed on my Windows 95 PC. It was built like an audio CD changer: one physical drive, several slots for disks, and a mechanism for automatically switching between disks under software control.   One of the modes for the changer was to present each loaded disk as a separate drive letter. This was nice in theory, until Windows decided to scan the drives for volume labels. It was slow, noisy, and blocked the UI for something like 10-15 seconds. I never really did use the drive.

  8. asdbsd says:

    @dave: Why would this be a bad idea? I think they did everything right. Application is uninstalled. Explorer remembers your preferences in case it ever comes back. After some time it says "Okay, I guess if you reinstall your app a year later you aren't going to expect me to remember how to treat it. So I can forget it now".

  9. Bob says:

    I remember seeing this once and thinking there was a bug with the uninstaller. I'm with Dave on this one. A nasty program runs through the windows icon directory and adds every icon to the notification area and you're stuck with it that way for at least a week.

  10. alegr1 says:

    You could ask users to set their clocks ahead by a week, wait a little bit to let it sink in, and then them back to the correct time.  But I wouldn't do this automatically, since as well know well by now, using a global solution to solve a local problem is fraught with peril.

    A guy goes to the gym's shower after a workout. When done, he finds that he forgot a towel. He steps out of the shower and sees a notice on the wall: "Please don't wipe with the window curtains!" He thinks: "Hm, that's a good idea!".

  11. Raphael says:

    You people must be checking out the Notification Area control panel an awful lot to notice that and be bothered by it.

  12. This is a Windows 95 issue, right?  Because my installers remove the notification icons just fine AFAIK in current day Windows.

    I suppose a workaround might be for the installer to make the whole icon transparent.  

  13. Damien says:

    So, the code to remove the icon (from C#) is:

       Thread.Sleep(7*24*60*60*1000);

  14. Not important says:

    I am with Dave @8:14 am on this one. It seems like a pointless thing to do. Whoever made this decision had to choose between a big dollop of confusion (for one week every time one opens the dialog you get a confusing action) versus an improvement in a narrow case which most people would not even notice. Big confusion versus hard to notice improvement. Is there even a choice to make here? Isn't the choice already made for you?

    [Suppose the code checked if the app was installed. You'll have a new complaint from users: "How come Explorer sometimes forgets my notification icon settings?" (Because the CD was not in the drive, or the USB drive was unplugged, or the network share was down, or the local folder was unavailable because the app was being updated.) And of course "Why does it take 5 minutes for the control panel to open and why does it spin up my CD-ROM?" -Raymond]
  15. John says:

    @Dave:  I think you are giving them too much credit.  The install-after-uninstall scenario is just code for "it was too hard" / "we were too lazy".  I mean really, how would you even implement that?  Are you going to poll every 10 minutes?  Hook into Windows Installer?  What about 3rd party installers?  You could do it before you show the icons, but Raymond pointed out the problems with that.  There is not a good solution.

  16. gdalsnes says:

    Is this related to the "Hide inactive items" "Past Items" in the "Customize notifications" dialog?

  17. Matt says:

    Surely the "good solution" is to just delete the settings during uninstall. If your app performs a reinstall, is it really so hard to reset the notification icon? It's certainly less confusing to users to see that the notification icon's settings' removal is tied to the uninstall than to see that the notification icon's survival is due to a heuristic that runs a week after the uninstall.

  18. Jeff Tyrrill says:

    Also, the roaming profiles scenario. You log onto a computer without that application installed. You don't want Explorer to forget your preference for that application every time.

    @dave: This isn't a weird case. It's the roaming profiles scenario that you're missing.

    Roaming profiles really hits home the concept of machine/user separation.

  19. "But I wouldn't do this automatically, since as well know well by now, using a global solution to solve a local problem is fraught with peril."

    So, the REAL answer is to patch explorer.exe with a modified GetSystemTime function which adds 7 to wDay in the SYSTEMTIME structure before returning?*

    * This is not a serious suggestion. If you are thinking of using it, please give up programming now. Please.

  20. Another approach is to keep the settings forever, but hide the icons for uninstalled programs from the UI.

  21. Oh, I see, that's what this was.

    This runs into problems, though, if the application resides on the network or removable media.

  22. Tweenie says:

    @Raphael "You people must be checking out the Notification Area control panel an awful lot to notice that and be bothered by it."

    Yep. You'd think some folks in this thread do literally nothing other than tweak notification icon settings.

    [Reminds me of the people who apparently spent all their waking moments formatting floppy disks. -Raymond]
  23. Jeff Tyrrill says:

    @Matt: Settings are per-user. Uninstalling a program is per-machine. The uninstaller doesn't even have *access* to the settings.

  24. Neil says:

    @mschaef I had a drive like that. I used to use it with a non-Windows operating system, but when I upgraded the operating system version it conflicted with the the drive's native software, and the built-in CD drivers tried to query status every disk, every second, making it spend all of its time mechanically changing the disks…

    P.S. I nearly didn't see this post. Looks like the Atom/RSS feeds are broken. Oops. Hope the site administrators fix things soon.

  25. John says:

    @Matt:  If it were that easy that's how it would have been done.  These settings are managed internally by Explorer.  Even if Explorer could hook into the install/uninstall process there are problems with multiple users, 3rd party installers, etc.  The feature is exclusively for convenience anyway.  Like antispam solutions it only fixes the symptoms (a gazillion icons in your tray) and not the disease (a gazillion pieces of useless shovelware that put an icon in your tray).

  26. "Even if you somehow fixed those problems, taking per-user action on app uninstall assumes a one-to-one mapping between computers and users. …."

    Exactly right.  So now Windows would need to maintain a database of uninstalled apps so that the profiles could be altered when the user logs in, or somehow have a system service that that grubs around in all the user profiles when the app is uninstalled.  That still doesn't solve the roaming problem.

  27. I'm with Raymond and John – to all the naysayers who think that the icon should have been immediately removed – how do you *specifically* propose to do this?  The default behavior if you don't code special cases is the current behavior.

    The Shell_NotifyIcon API simply does not provide a way for apps to provide install/uninstall notifications.  There would be two ways Microsoft could go about this:

    1.  Have the shell detect that an app is uninstalled and then remove the icon.  But this raises some issues: (1) too many long, blocking I/Os, disturbing slow media like CD-ROM drives, etc. (2) removable and network media may not be available, causing the icon to falsely be removed, (3) some applications might extract a temporary EXE file that shows a notification icon.  For #3, our company uses an app like that – a customer might run our application frequently, but the path to the temporary EXE is constantly changing.

    2.  Have an API for applications to notify the shell when an application is installed/uninstalled.  That means the app can notify the shell when the icon will no longer exist – since it is the app that best knows when it is uninstalled.  But this raises more issues: (1) what about apps that don't have setup programs – e.g. simple, single-purpose, single-EXE files? (e.g. the SysInternals tools like Process Explorer) (2) what about misbehaved apps that don't call the API like they should be? (3) what about legacy apps?

    Both options suck.  Therefore, the current behavior is preferable.

    [Even if you somehow fixed those problems, taking per-user action on app uninstall assumes a one-to-one mapping between computers and users. What do you intend to do about all the other users? Or if a single user roams to multiple computers? (I have two systems both with Program X installed. I uninstall Program X from Computer 1. If this deletes Program X's settings, then its icon settings are missing from Computer 2!) -Raymond]
  28. cheong00 says:

    Can there be a function like "cleanup notification icons" invokable by context menu?

    Since this type if functions are known to be slow (think about "disk cleanup tool"), even if it'd make user's machine lower, they should understand.

    And I think only the users who "can't stand having such icon poke in their face" will run them, these are people who will take whatever it needs to get the icons away.

    That said, such feature would probably be very low on "wanted feature" list, and probably never make it to become real feature… :P

  29. Danny says:

    There is no documented mechanism for removing the icon (and the undocumented mechanisms destroy all the icon history, not just the icon history for your icon, so don't do that either)</quote>

    So, what's the undocumented mechanism to destroy the icon history all together? Nevermind, you let the cat out of the bag and it will be implemented and you'll have one more compatibility issue on your hands, so this undocumented mechanism will become a documented one in the future. Thanks for the tip Ray :P:P

  30. 640k says:

    This will be "fixed" in windows8 by removing the systray altogether, and users will be touted the "solution" as a groundbraking innovation. Please prepare for the 20 page article explaning why you can't use a computer without this upcoming feature.

    Meanwhile, other OSes design their APIs and GUIs correctly from version 0.01.

  31. Joshua says:

    Wow 640k is troll today.

    It might be possible to cause specific removal by changing system time inappropriately, but the side effects of that make me shudder.

Comments are closed.

Skip to main content