Additional Data: Error Value: 2147942402. How to fix?
Asked Answered
D

7

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?

Dodwell answered 8/8, 2012 at 13:15 Comment(2)
Perhaps this might help: vistax64.com/vista-general/…Joshuajoshuah
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.Ritch
B
21

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.

Backlog answered 9/2, 2018 at 22:41 Comment(2)
My Scheduled Task ran a batch file, a path in the batch file didn't exist.Peach
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.Fimble
H
7

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

Hinshaw answered 26/4, 2017 at 15:51 Comment(0)
S
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.

Sinusitis answered 4/2, 2015 at 7:54 Comment(1)
Have not find other solution for that.Sinusitis
F
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.

Freestanding answered 20/8, 2018 at 16:16 Comment(1)
Same problem here. I tried everything to salvage the task. Wish I would have just learned from you and started from scratch.Lardon
B
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:"

Briseno answered 10/9, 2021 at 16:48 Comment(0)
G
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)".

Granados answered 2/8, 2022 at 20:8 Comment(0)
S
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>
Saltus answered 12/2, 2023 at 3:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.