Our company has an old application written in Java. One of its components is a server. This server is made into a service by a wrapper. Before Windows 7/Vista this server, via a custom dll, would place an icon in the tray. The icon's purpose is:
- Show that the server is running.
- Whether or not it successfully connected to the SQL Server.
- Allow the user to stop the server service.
- All the user to change the server's log level.
To get this to work on Windows 7 the server java code was split into two. A portion that started the server. A portion that would contact the server, get its status and place the icon in the tray. This second portion, called IconApp, is still in a jar and is made executable by using Launch4j. The Launch4j executable is called tray.exe. The exe does not contain the jar. A shortcut for tray.exe is in all user startup folder.
Once a machine is booted, if tray.exe is double-clicked, the UAC dialog pops up and asks the user if they want it to run. When granted, everything runs fine; icon in tray, controls work...
At boot however is where we are having our problem. The server service starts when the machine boot, no issues. But when a user logs in, the IconApp, via tray.exe does not start; so there is no icon in the tray. I have tried adding a simple manifest to the Launch4j, tray.exe, but that did not seem to make any difference; I tried 'asInvoker', 'highestAvailable' and 'requireAdministrator' with uiAccess set to true.
What now?