I have scheduled a task to lauch a batch file. When I run the task with the option
Run only when user is logged on
everything works fine.
I want to run this task in the background, hence I am running it using the option
Run whether user is logged on or not.
Now when I run the task under that parameter, it is not working. I get the following 2 errors:
- 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.
What is Error Value: 2147942667? How can I resolve this errors?
GetExceptionForHR
, but you must pass it a signed 32-bit integer. For example, if you open PowerShell and type[System.Runtime.InteropServices.Marshal]::GetExceptionForHR(0x8007010B)
it will show you: The directory name is invalid. (Exception from HRESULT: 0x8007010B) – Mattingly