a client of mine uses the task manager to trigger (start) a process to do something. This process contains a UI, and needs to be a single instance at all times (been taken care of).
Everything runs smoothly from the task manager, accept if you need to set the task manager settings to:”run whether user is logged on or not” (see the answer why this is a problem here: http://social.technet.microsoft.com/Forums/en-US/c03d6691-b058-4f8d-961c-e8eba25bbaed/task-scheduler-problem-run-whether-user-is-logged-on-or-not
Ok..no problem. We just let the task run only if the user is logged on. Still works fine (even with computer locked).
But, this night windows had an update and the system automatically rebooted. Logging of the user and therefor the task manager was not able to run the tasks. :-(
Since the program has a UI (is needed), I cannot switch to “run whether user is logged on or not”. What would be best practice to:
- logon again as the user that needs to run the application
- make sure that the started application, is actually visible to the user, when he logs in? (unlockes the computer)
I know how to run processes with different user credentials in C#, but that’s not the solution for this problem.
Automatically logon a user (and lock the computer) when the computer has started, would be great. Is this in any way possible? Or is there another solution for my problem?
Regards,
Matthijs