I am facing a strange problem. I have scheduled a task to lauch a batch file. When I run the task with option Run only when user is logged on
everything works fine. but I want to run this task in background and hence i am running it using the option Run whether user is logged on or not
. Now when i run the task it is not working. I get following 2 errors. I don't understand this error. Please help me resolve this issue.
Task Scheduler failed to launch action "C:\Windows\SYSTEM32\cmd.exe" in instance "{2a7cc950-fad9-4633-9701-af75a0fd220d}" of task "\stmm\Daemon". Additional Data: Error Value: 2147942667.
Task Scheduler failed to start instance "{2a7cc950-fad9-4633-9701-af75a0fd220d}" of "\stmm\Daemon" task for user "GBLADHEDANI\N011940" . Additional Data: Error Value: 2147942667.
Best Answer
I had this same issue.
The solution for me was found in the Microsoft KB Article 2452723:
Windows Vista onwards scheduled tasks fail to run if the path in "Start in (Optional)" field has quotes
Basically, edit your scheduled task and take the Quotes out of the Start In field:
To get the relevant error message:
1) Convert 2147942667 to hex: 8007010B
2) Take last 4 digits (010B) and convert to decimal: 267
3) Run: net helpmsg 267
4) Result: "The directory name is invalid."