I have a program that is launched on system startup using Task Scheduler on Windows Server 2012.

The program must start even if the computer reboots automatially.

You can add the shortcut of the program to here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

But this one need the system to logon.

Stop! Don’t cringe just yet. Read on…

  • Run it, set it so that Administrator should log on automatically.
  • Create a task in Task Scheduler. Set it to run only when user (Administrator) is logged on. Trigger is “at log on” and specify that it’s only when Administrator logs on.
  • Create a second task. Run only when user is logged on, trigger at admin log on. Action should be “start a program” and program is “C:\Windows\System32\rundll32.exe” with the argument field set to “user32.dll, LockWorkStation”.