15

I wish a task to be scheduled to run when any user logs on, but is not dependent on any one user being logged on, so I pick "Run whether user is logged on or not". The problem with this is that the program runs hidden (as stated in the docs and queried in this Microsoft Community post), but I need the GUI to be visible.

So, I need to pick "Run only when user is logged on" for it to be visible. But any one "normal" user might not be logged on!

Which user account should I use in order to run this task?

I tried running it as SYSTEM, but that automatically sets the "Run whether user is logged on or not" option - so it will run hidden.

0

1 Answer 1

16

I just tested this and you can select a "group" for the account.

Pick Run only when user is logged on.

Click Change user or group (it says group right there :)

type in users and click Check Names and Click Ok

and you application will run interactively for all users in the group users.

4
  • Thanks, I think this is the preferred the solution. (However, in my particular case there were a few added complications that I didn't mention... 1. Only one instance of the task/program should run, so whilst the GUI appears for the first logged on user, it is not visible to the second user unless they run a new instance. 2. This program also requires admin privileges, so when a non-admin user logs on first they get pestered with UAC.)
    – MrWhite
    Oct 10, 2013 at 15:16
  • 1
    2) The non-admin users would always get the UAC of course. If you don't want non-admin users to run the program at logon you could always use the Administrator-group instead. For point 1) I take it you're using "Fast user switching"? You could disable this forcing the users to logoff before another can logon.
    – Rik
    Oct 10, 2013 at 15:22
  • 2) If the task is set to run as AnAdminUser (with the "highest privileges") then a normal user doesn't get prompted by UAC, but neither do they see the GUI - it is hidden - which doesn't help either. 1) "Fast user switching" is preferable in this instance. I'm going to settle for running this program only by the main admin user and accept that normal users just won't see the GUI (which is really for information only), it's a compromise, but OK. Thanks for the info.
    – MrWhite
    Oct 10, 2013 at 16:08
  • Mhmm... for me it worked only when I set the account to LOCAL SERVICE. It then automatically switches the option to Run whether user is logged on or not on. With Users I had no luck.
    – t3chb0t
    Feb 17 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.