I want to create a scheduled task to run under the "LOCAL SERVICE" account. The task will call a C# program (.NET 4.5). To do a POC, i kept the C# program to be simple - one that just writes a text to a Console.
The taskscheduler task is set to run when not logged on. I have made sure that the c# executable has permissions for the LOCAL SERVICE (Read, REad and Execute).
When I run the scheduled task, i get the below error in the event log:
Task Scheduler failed to start instance "{e719a65e-d4fb-4515-9fc9-3635fe69e378}" of "\Testing LOCAL SERVICE" task for user "NT AUTHORITY\LOCAL SERVICE" . Additional Data: Error Value: 2147942405.
However, if I run the same task under LOCAL SERVICe by pointing to known programs like mspaint or notepad, the task runs without errors. I am not sure what is so specific with permissions for the C# program.
Appreciate some thoughts on this.
.exe
file and containing folder - has permissions. Also verify that it's really local - mapped network drives only apply to the user session that created them. – Follower