Additional Data: Error Value: 2147942402. How to fix?

Viewed 41490

I have a number of different sheduled tasks that are set to run some executable files written in VB.Net. When they go to run they almost always get an error saying that the task failed to start and references this error value:

Additional Data: Error Value: 2147942402

How can I fix this?

6 Answers

I was getting the same error message. As pointed out in this other answer, it turns out that the error code 2147942402 actually means File Not Found.

I was creating my Scheduled Task programmatically, and it turned out that I had a typo in the path of the executable that I was specifying to run, and it didn't actually exist. Once I corrected the file path of the exe that the Scheduled Task was set to run then everything worked as expected.

Changing permissions, different files or locations didn't work for me. I had to create a brand new task and disable the old one, and it worked for me. Something must've been corrupted with the original task.

I fixed this error by changing "Run whether user is logged on or not" to "Run Only when user is logged on" on the General tab of the task.

You must a valid user on the General tab-> security options-> "When running the task, use the following user account:"

I was getting this error when running a batch file as my scheduled task. My task action pointed to a batch file and executed successfully but reported operational code 2 and the following details.

Task Scheduler successfully completed task...., action "C:\Windows\SYSTEM32\cmd.exe" with return code 2147942402

I fixed this by changing the final exit code to:

exit 0

Make sure to trap and handle errors in the batch file. If the batch runs successfully then change "exit" to "exit 0". Now the task scheduler result is "The operation completed successfully (0x0)".

Related