I'm setting up a Windows 7 machine that will sit out in the open and be shared by a lot of people. I have added a shortcut to the all users start menu to run a program that sits in the system tray. I want the tray icon for this program to always be visible by default, no matter who logs in. A user can turn it off on their profile if they really want to, but I need it to at least start out set as always visible. How can I do this?

I would rather not show all the icons, in part for the same reason they are hidden in the first place: I don't want the clutter. Also, as this is a public computer there is another program called DeepFreeze running that also has a system tray icon, and I don't want that icon to show all the time.

link|improve this question

71% accept rate
Can't you show the icon/message by some other mechanism than in the system tray? – user1203 Aug 2 '11 at 15:52
feedback

2 Answers

up vote 1 down vote accepted

In a nut-shell, currently, you can't do this.

There is no Group Policy or Preference to set this, and the way it keeps track makes it's specific to the current user and the system, making the 'settings' vary greatly from instance to instance.

They are stored here (in the registry) if you want to check it out: HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify.

From here:

There is no way for applications to programmatically always show themselves top level on the system tray either on first install or at any time during runtime. This is one of several changes we’ve made in Windows 7 in an effort to produce a cleaner, quieter desktop that is in the user’s control to customize the top level with their favorite applications and icons.

We keep the user in control of the notification area by not allowing programmatic promotion (other than temporarily or to show a notification). Assuming the machine is sufficiently quiet, when you first add your icon with Shell_NotifyIcon(NIM_ADD, ...) it will be shown on the taskbar for 45 seconds, then move into the overflow thereafter. If the user promotes an icon, it will always live on the taskbar. If the user demotes it, the icon will never be seen on the taskbar. Any promotion needs to be user initiated. We’ve made this much easier in Windows 7 via drag/drop & through the Notification Area Icons control panel, and what we’ve seen in usability studies and based on beta feedback, is that users have no difficulties discovering how to customize notification behavior and will promote the icons they want quick access to.

About your easiest bet, is to show ALL Notification Area icons for all users. This can be done by adding a (simple) registry entry:

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer create a new DWORD value named EnableAutoTray and set it to 0 to turn off the Notification Area's 'auto hide' features.

With some OU configuration and scripting you can use it in a HKCU context as well, if you only want it to happen for certain users/groups.

See here for more info on that.

link|improve this answer
I'd rather not show all the icons, but I will if I must. – Joel Coehoorn Aug 2 '11 at 15:12
+1 for the link at the very end – Joel Coehoorn Aug 2 '11 at 16:57
feedback

I don't know if you can set the cache order for icons considering it could constantly be changing if new programs were added, but you can set the notification to "Always show all icon and notifications on the taskbar".

To set this to be the default, go to this registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer

Add the DWORD value "EnableAutoTray", double-click it, and set the hexadecimal value to "0".

I tested this and it worked.

Interesting note: I first tried to add it to this key:

HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer

I have always thought that was the default registry for new users, but it did not work. So I went looking and found this interesting article busting my long-held thoughts about that .DEFAULT key.

http://blogs.msdn.com/b/oldnewthing/archive/2007/03/02/1786493.aspx

Addition: The best I can tell is that the registry entries are here If you were going to try and set one icon the way you would if you opened up "Control Panel\All Control Panel Items\Notification Area Icons":

HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify

If you look at them, they are not very understandable, so I am not sure how well you would do editing them.

I suggest that you consider making a new user and its profile, set the "Control Panel\All Control Panel Items\Notification Area Icons" for that one icon (at least) to "Show Icon and Notifications".

Then reboot to release the profile, and log in as administrator. Copy that profile to the "C:\Users\Default" profile. You can do that either manually using Explorer, or the way we used to do it in "Control Panel\All Control Panel Items\System" "Advanced System Settings>Advanced>User Profiles>Copy to". It will be grayed out, but you can use the Windows Enabler to get around that.

link|improve this answer
I'd rather not show all the icons, but I will if I must. – Joel Coehoorn Aug 2 '11 at 15:11
I am going to add to the answer. – KCotreau Aug 2 '11 at 15:49
I've seen the Windows Enabler and other copy profile solutions, but experimentation has shown that this really is broken for windows 7. It makes me sad :( – Joel Coehoorn Aug 2 '11 at 16:54
I agree Joel, WHY would they disable that function? I still have no idea other than people trying to copy it to the wrong place. – KCotreau Aug 2 '11 at 17:01
@KCotreau: It was on the Windows Deployment blogs. It has something to do with certain operations that happen only during the creation of the profile, ie "Preparing your desktop. . ." Frankly it sucks, but I can see why they are trying to move everyone away from this method. It's just simply unpredictable what the end results will be. – surfasb Aug 2 '11 at 17:22
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.