Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Software

Vista - Task Scheduler Returned Error 0x2

Reply
 
Old 06-11-2008   #1 (permalink)


Vista Ultimate x32
 
 

Task Scheduler Returned Error 0x2

I need to run a batch script to download files via ftp.

The script works fine on XP pro, deleting specified files from a local directory and replacing them with downloaded files from an ftp server.

When I run the script through Task Scheduler in vista, it only removes the specified files without downloading the replacements.

Just to add that I tested the bacth file manually and it worked fine.

I need help before I lose my head!

My System SpecsSystem Spec
Old 06-12-2008   #2 (permalink)


Vista Ultimate x64 MAK, OpenSolaris 5, Gentoo 2008.1....
 
 

Re: Task Scheduler Returned Error 0x2

Hmmm - you can manually run the file and it runs OK? Did you allow the batch file privileges in the set up of the task scheduler item?
My System SpecsSystem Spec
Old 06-12-2008   #3 (permalink)


Vista Ultimate x32
 
 

Re: Task Scheduler Returned Error 0x2

"Did you allow the batch file privileges in the set up of the task scheduler item?"

Thanks for your response. I'm not sure I understand this or how to it.
My System SpecsSystem Spec
Old 06-12-2008   #4 (permalink)


Vista Ultimate x64 MAK, OpenSolaris 5, Gentoo 2008.1....
 
 

Re: Task Scheduler Returned Error 0x2

I am assuming you manually created your task scheduler item for the batch file, so on the first tab (General) did you check Run with highest privileges
My System SpecsSystem Spec
Old 06-12-2008   #5 (permalink)


Vista Ultimate x32
 
 

Re: Task Scheduler Returned Error 0x2

Yes. I selected "Run with highest privileges".
My System SpecsSystem Spec
Old 06-12-2008   #6 (permalink)


Vista Ultimate x64 MAK, OpenSolaris 5, Gentoo 2008.1....
 
 

Re: Task Scheduler Returned Error 0x2

Hmmm - OK, then it might be because batch files cannot be 'normally' elevated. have you tried saving it as a .cmd extension instead of a .bat extension to see if it works that way?
My System SpecsSystem Spec
Old 06-12-2008   #7 (permalink)


Vista Ultimate x32
 
 

Re: Task Scheduler Returned Error 0x2

I changed the extension to .cmd but got the same result. The old files were removed as expected but the script won't download from ftp. It returned error code 0x2
My System SpecsSystem Spec
Old 06-12-2008   #8 (permalink)


Vista Ultimate x64 MAK, OpenSolaris 5, Gentoo 2008.1....
 
 

Re: Task Scheduler Returned Error 0x2

When it returns that error code, what exactly does it say, just Error 0x2?
My System SpecsSystem Spec
Old 06-12-2008   #9 (permalink)


Vista Ultimate x32
 
 

Re: Task Scheduler Returned Error 0x2

Just 0x2
My System SpecsSystem Spec
Old 06-12-2008   #10 (permalink)


Vista Ultimate x64 MAK, OpenSolaris 5, Gentoo 2008.1....
 
 

Re: Task Scheduler Returned Error 0x2

That is weird. Does the script have an exit command at the end of all the commands? Is the batch file located in the directory you want to copy to?

I am at a loss - I cannot understand why it would not work by TS and will in live....

Care to post the batch in a code box here so we can see what exactly you're doing, or does it have sensitive material?
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Task Scheduler Error-task image corrupt or has been tampered with User_Feed_Synchroni General Discussion
Task Scheduler Returned Error 0x2 While Running Batch File Vista account administration
Task scheduler returns an error : the task image is corrupt ortamp Vista performance & maintenance
Task Scheduler Error Vista performance & maintenance
Task Scheduler error Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46