Scheduled Task Runs, and exits on code 0xc0000142

  • Thread starter Thread starter BGMike
  • Start date Start date
B

BGMike

Hello,

I have created something similar to an automatic update for within our
company.
It runs 2 batch file on alternating weeks.

It runs currently on about 150 systems. All Windows XP SP2 with about
95% being home and the other 5% being PRO. Of the 150 PC's 55 work with
no hiccups. But the remaining tasks say they have completed, and exit
code is 0xc0000142.

But they have not completed nor have they made it even half way
through. I can tell this by the batch file which send me a report (text
file) based on where/what in the batch it has run and if it has
completed.
The completedness of the tasks vary week to week and PC to PC.
Does anybody know as to why this would happen?
 
BGMike said:
Hello,

I have created something similar to an automatic update for within our
company.
It runs 2 batch file on alternating weeks.

It runs currently on about 150 systems. All Windows XP SP2 with about
95% being home and the other 5% being PRO. Of the 150 PC's 55 work with
no hiccups. But the remaining tasks say they have completed, and exit
code is 0xc0000142.

But they have not completed nor have they made it even half way
through. I can tell this by the batch file which send me a report (text
file) based on where/what in the batch it has run and if it has
completed.
The completedness of the tasks vary week to week and PC to PC.
Does anybody know as to why this would happen?

You need to find out for yourself, by giving yourself some eyes.
Modify your batch file like so:
@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
c:\Tools\YourTask.exe 1>>c:\test.log 2>>&1
echo ErrorLevel of c:\Tools\YourTask.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

Now examine c:\test.log and all will become clear!
 
Thank you for the help Pegasus. Though it did not help.

However I did find the problem and the solution.

Problem: I created a SysAdmin user with a password on all PC's using
the NET USER command. Most of which were never accessed.

Solution: Initialize the created user. (i.e Log on with user.)

Fixed the follwoing errors: (Exit Codes)
0x1
0xc0000142
 
Back
Top