What determines the order of applications in the Windows 7 system icon tray?

Something that I have wondered about, I notice that despite changing the order of running some of my applications, even stopping and restarting them or even between reboots.....they seem to occupy the same display position in my system icon tray.

So I am curious as to what is determining the display order in Windows?

Can it be changed? If so, how.

Thanks


The tray icon's order isn't determined by their load timing or anything like that, at least not in Windows 7 and up.

Since Windows 7, you can drag tray icons around to change the order yourself. You can even decide which one to always show and which to always hide by right-clicking the taskbar, going into Properties and then, under Notification area, click Customize.

In the same panel, you can also choose to completely hide system icons like network, volume and battery.


I had a look with Sysinternals Process Monitor (filtering on "tray") in Windows 8. When you move an icon in the systray, this registry key gets updated:

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

Specifically, these values in that key get updated: LastAdvertisement, UserStartTime, PastIconsStream, IconStreams.

I'm guessing the icon order is stored in the IconStreams value.