Scheduled task (run .bat file) fails every time with 0x80070002 (file not found)

B

Ben Dilts

I have a .bat file on a local hard drive that I'd like to run every night.
I set up a scheduled task to do it. It worked great for about 8 days, then
began to fail every time on task startup. I get the following message: "The
system cannot find the file specified. (0x80070002)". The History tab for
the task shows an error: "Launch Failure". I made the .bat file do nothing,
and I get the same error, so the error is definitely not coming from my
batch file. I get the same error if I right-click the task and click Run.

I checked, and the task scheduler service is in fact running.

For what it's worth, I've included the XML Details on the "Task Start
Failed" error.

I checked, and the .bat file is still in the same place it always was. I
deleted and recreated the "Start a program" action on the task, browsing to
and selecting my .bat file, so the path is definitely correct.

What's going on here?


Ben Dilts

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-TaskScheduler"
Guid="{de7b24ea-73c8-4a09-985d-5bdadcfa9017}" />
<EventID>101</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>101</Task>
<Opcode>101</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2008-07-17T16:37:33.161Z" />
<EventRecordID>23192</EventRecordID>
<Correlation />
<Execution ProcessID="1008" ThreadID="1524" />
<Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
<Computer>Zeus.zanebenefits.local</Computer>
<Security UserID="S-1-5-18" />
</System>
- <EventData Name="TaskStartFailedEvent">
<Data Name="TaskName">\Corporate website snapshot</Data>
<Data Name="UserContext">ZANEBENEFITS\ben.dilts</Data>
<Data Name="ResultCode">2147942402</Data>
</EventData>
</Event>
 
M

Mark L. Ferguson

When you setup a task, one of the checkboxes will allow you to run the task
with the highest privileges
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top