22 November 2011

Windows Task Scheduler error 2147942667

If you have created a task within Windows Task Scheduler, you might encounter a task that does not run properly. When you look into the history of the task, you might find the following error message:

Task Scheduler failed to start instance "<guid value>" of "<task name>" task for user "<user name>" . Additional Data: Error Value: 2147942667.

The reason for this error is the fact that you have put quotes (") around the value in Startup Path. Strangely, the executable may have quotes surrounding it (e.g. "C:\Path to\Executable.exe"), but the Startup Path may not, even when there are spaces in the Path (which makes the use of quotes for the executable necessary).

Remove any quotes you have in the Startup Path value and try again.

See also this Microsoft Support Article:
Windows Vista onwards scheduled tasks fail to run if the path in "Start in (Optional)" field has quotes


Matt said...

Thanks for this tip - worked like a charm. Must've saved me a good few hours of howling and butt-scratching.

How on earth did you figure this one out?

Michael Jepson said...

Hi Matt,

Thanks for your message. As to how I figured it out: I removed the task and the second try it worked. Only difference was the fact that I had left out the Startup path, so I knew it had something to do with that. When I added it again, it gave me the error again. A bit of research into how the Startup path is supposed to be set solved it quickly from there.

Anonymous said...

A shining example of excellent UI design. I wonder if the people responsible have some justification for it?

Anonymous said...

You've saved me today. Thanks!.

Unknown said...


Michael said...

Thank you *so* much for taking the time to post this!

Stephen said...

I've got one- what if your "Start in" path doesn't have quotes? I'm trying to run a scheduled task as a new user (one dedicated to running services and scheduled tasks) and when I switch over to the new account, I get this error.

I've changed the task to "Run whether the user is logged on or not" (as I was getting that error) but now this error is cropping up. I've checked the start in and there are no quotes. I've also tried re-keying the start in as well as setting the task to run with Highest Privileges. Still won't run.

I realize this post is old but has anyone seen this behavior and know how to fix?

Michael Jepson said...

Probably the error just means the file could not be run for whatever reason.
Does the new account have rights to execute the file?


Stephen said...

It should, yes. It's a member of every Administrator group on the domain I could find.

gw46 said...

someone here..need quick answer to dummy question...task scheduler--setup..in ACTIONS> Program/script I have IExplore.exe
then Add Arguments is the Http -url- I need to point to..if this is so far correct..then does the path go in the Start in (optional field) ?? if so how is it coded..

Natalee said...

I'm having the same problem as Stephen mentioned. I am getting this error but there aren't any quotes in the start in field and the box is checked to run when user isn't logged on. I also made sure the user has full rights

Anonymous said...

Natalee, You may want to check "run with highest privileges" which worked for me.

Terry said...

I found that is had nothing to do with quotes, 'run highest privilege', or permission. It seems to be a bit of a bug in the Task Scheduler UI.
I added this path in the 'Start In (optional)' argument:

- it had not quotes, but the task would give the above error.
- I then removed that path from the argument, and ran it again and it started to work.
- now for the crazy part.... when I pasted the exact same path (above) into the argument, it works perfectly.

Go figure.

Anonymous said...

Thank you for posting this. This is bizarre.


bottlenecked said...

Also happened to me by setting startup path to non-existant directory :P

huycool said...

Holy smokes! Removing the start in argument and then re-applying it works for me as well. Strange indeed.

Leslie Lim said...

Thanks to the writer of this article. I appreciate your effort in making this informational blogs. I know it's not easy to do this but you have done a really great job. Congrats. I'm pretty sure your readers enjoying it a lots.


bknows2 said...

I don't have any quotes in my "start in" field, and I tried all the suggestions, but none worked. Everything works fine until I check the "Run whether user is logged on or not" button, regardless of whether I have "Run with highest Privilges" checked.

Mehdi Abboub said...

Very crazy, got stuck with that same issue for two hours. Removing the path, saving it as empty, the error disappears. Once you put back the path, the task works perfectly. Thanks to you gents.