I'm very confused at what permissions are necessary to run scheduled tasks. If I schedule a task to run at 5am every day, what user does that run under? Does that user need log on access?
1 Answer
Your questions are all configurable options.
schtasks /create /F /RU system /TN "taskname" /TR "C:\windows\system32\cmd.exe /C mklink /D .\target .\source" /ST 00:00 /SC "ONCE" /RL "HIGHEST"
In the above /RU system
makes it run as system, and mklink usually requires more permissions, so the /RL "HIGHEST"
sets the permission level to highest. There is also a selection to allow the task to run if the user is logged in or not (definitely on the GUI, not sure of the command line option off the top of my head). The user doesn't even need to have log on access (system works).