Task Scheduler EXE without user login

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Task Scheduler EXE without user login

Post by winstein » Tue Aug 15, 2017 5:36 am

There is a program that I have made that involves opening a designated program and then using keyboard commands on it, but the program is meant to run as a task in Task Scheduler. However, based on my testing, I found out that it will not run when the option "run whether user is logged on or not" will not run this program. On the other hand, the option "run only when user is logged on" works as intended.

How do you allow the Macro to run a program as described, even if the user is not logged on?

Thank you for reading.
PPQ

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Task Scheduler EXE without user login

Post by Marcus Tettmar » Wed Aug 16, 2017 8:41 am

If you need to use keyboard commands to do something in a program then a user needs to be logged in. There is no keyboard console and there is no UI when a user is not logged. You simply can't do UI automation without a logged in user.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Re: Task Scheduler EXE without user login

Post by winstein » Fri Aug 18, 2017 7:38 am

OK, got it. I am planning to compile another program to log into the server for the sole purpose of allowing the inside macro to run.
PPQ

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts