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 Newsgroups > Vista General

Vista - Scheduler does not run batch file and can't run as an administrator

Reply
 
Old 08-09-2008   #1 (permalink)


32 bit Vista home basic
 
 

Scheduler does not run batch file and can't run as an administrator

I have a batch file that has a series of xcopy commands in it that runs fine interactively (just double click on the file in Windows), but not in the scheduler (set to run as an administrator). It instantly quits. You can see the DOS box for a fraction of a second, then it disapears. The result code is (0X1). If I run it interactively "as an administrator" (right click on the filename /run as an administrator) I get the same type of result, the DOS box comes up and disappears instantly.

I put a "pause" statement in the first line of the batch file, but the DOS box still just flashes on the screen and disappears.

Can anyone tell me what is going on?

My System SpecsSystem Spec
Old 08-09-2008   #2 (permalink)


32 bit Vista home basic
 
 

Re: Scheduler does not run batch file and can't run as an administrator

OK. You are not going to believe this. The reason for it NOT executing was that there was an & in the file name. Take the & out of the filename and it works fine. Why oh why does an & stop the batch file from working when running in the scheduler or as an administrator (right click, run as administrator), but double clicking on it to run is NO PROBLEM AT ALL???
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Running a batch file with scheduler Vista General
Windows Task Scheduler with a batch file General Discussion
How to determine a batch file is running as administrator General Discussion
Vista Task Scheduler - Batch File Vista General
Task Scheduler Returned Error 0x2 While Running Batch File Vista account administration


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