Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have also posted this question on stackoverflow, but will also try here, since it might be more system-related

I am writing a webapplication using .NET. The webapp creates scheduled tasks using the System.Diagnostics.Process class, calling SCHTASKS.EXE with parameters.

I have changed the identity on the app pool, to a specific domain user. The domain-user is local administrator on all the four webservers.

From webserver01 I am creating tasks on webserver01 to webserver04.

It works perfect for 3-5 days, but then it breaks. It gives me the following errormessage in a messagebox:

"The application failed to initialize properly (0xc0000142). Click on OK to terminate the application."

If I have the system in the broken state, and I change the identity of the app pool to Domain administrator, it works. As I change it back to my domain-user, it breaks again. If I reboot the server, it works again for the same amount of days, but will break again.

It seems like a permission-related problem. I just don't understand why it works sometimes, and sometimes doesn't.

I hope someone outthere has seen this problem!

Looking forward to hear from you!

Kind regards,

Morten, Denmark

share|improve this question

A good starting point, is to look at the scheduled task log file as it will give you a more verbose log.

share|improve this answer
I just went through the entire log file. Only containing successful executions. It is also the creation of a new scheduled task that gives me the error. That is with SchTasks.exe /create... Kind regards Morten – Morten Louw Nielsen Apr 6 '10 at 22:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.