15

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?

2
  • 1
    Perhaps this might help: vistax64.com/vista-general/…
    – Bridge
    Aug 8, 2012 at 13:23
  • I had the same issue because the absolute path to the file I was running had spaces in it. So in the additional arguments of the action I had to put "..." around the path to the file but for whatever reason, you can't put quotes around the Start In path.
    – Dan
    Nov 22, 2018 at 16:32

7 Answers 7

20

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.

2
  • My Scheduled Task ran a batch file, a path in the batch file didn't exist.
    – AJ AJ
    Apr 21, 2021 at 5:11
  • I had to move the path to the file into the "Start in" input field, and I also moved arguments to the "Add arguments" input field. So, I have only the name of the CLI command in the "Program/script" input field. Jul 24, 2021 at 5:49
6

I had the same issue when I tried running web pages with IE using windows scheduler.

Follow these steps:

-Right click your task -> properties.

-Click the Settings tab, look for "If the task is already running, then the following rule applies", should be at the bottom of the dialog, and set the DropDownList value to "Stop the existing instance".

-Click the Actions Tab, edit your task, under Program/script choose the FULL PATH of the application running your task (In my case I replaced iexplore.exe with C:\Windows\winsxs...\iexplore.exe)

Hope this helps you :-)

4

I got the same Additional Data: Error Value: 2147942402. For me the solution that worked was to delete the task and create the new one, the same that was deleted. You can also try to validate the password for user on with the task is running.

1
  • Have not find other solution for that. Aug 30, 2015 at 21:18
3

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.

1
  • Same problem here. I tried everything to salvage the task. Wish I would have just learned from you and started from scratch. Jan 16, 2019 at 21:18
0

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:"

0

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)".

0

I encountered the same issue while executing the command on the remote server. I fixed the issue by including cmd /c in front of the command.

The command for which I was getting error:

<filepath> <command to run>

The fix that solved the issue.

cmd /c <filepath> <command to run>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.