I have a service that I need to launch a forms application whenever a user logs in. This I have done, no problem, however if this user logs off using "switch user" instead of "log off", and then a new user logs in under a different account, my service will launch the application on the original user's desktop, instead of the new user's desktop. How can I fix this so that the application will launch on the correct desktop
In my OnStart() method for the service, I start a Management Event Watcher, checking for Win32_LogonSession. When the event fires, I launch my application using process.start.