I need a service running with local system, that will start an application in user's session (CreateProcessAsUser) and pass the user name as an argument to the application.
The service should:
1. Work on Windows XP and later (Vista, Win7, Server 2008, etc)
2. Word on a workstation as well as on Windows Terminal Server (multiple users)
3. On startup, the service will verify in every user sessions if the application is running or not. If not, the application will be launched and the username will be passed as a parameter for the application.
4. On user logon ([url removed, login to view]) the application will be launched and the username (user's login name) will be passed as a parameter for the application.
For development and testing purposes, the application to be launched will be **C:\Windows\[url removed, login to view]** **c:\temp\**<username>**.txt** (where <username> is the user's login name). Each <username>.txt file used for testing must be created prior to launch notepad.