Can I schedule a windows task to run in an interactive desktop session?
I'm trying to create a scheduled task that will run once daily on a dedicated machine. The task will run an exe. That exe does a bunch of things, including running automation that manipulates the mouse/kb etc.
Is that possible (on any windows based OS)?
Solution 1:
Sure...leave the user that the scheduled task runs as logged in and set the task option to only run when the user is logged in.
I believe you can use schtasks as well: http://msdn.microsoft.com/en-us/library/windows/desktop/bb736357%28v=vs.85%29.aspx using the /IT parameter but again I think it only works if the actual user is logged in that the task runs as.
Other than that, you can use FireDaemon to have an interactive session run a task as a service.
Solution 2:
Yes, it's pretty counter-intuitive. If you select "run whether user is logged on or not" It's going to ask for the password of the user whose account you're using.
But if you select "Run only when user is logged on" It won't ask you for the user's password.