Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Scheduler does not run batch file and can't run as an administrator

Reply
Thread Tools Display Modes

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

 
 
eganders
Guest
Posts: n/a

 
      08-09-2008

I have a batch file that has a series of xcopy commands in it that run
fine interactively (just double click on the file in Windows), but no
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 a
administrator" (right click on the filename /run as an administrator)
get the same type of result, the DOS box comes up and disappear
instantly.

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

Can anyone tell me what is going on

--
eganders
 
Reply With Quote
 
 
 
 
eganders
Guest
Posts: n/a

 
      08-09-2008

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???


--
eganders
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista Task Scheduler - Batch File MCM Windows Vista General Discussion 2 06-27-2008 07:30 PM
Task Scheduler Returned Error 0x2 While Running Batch File lqd1967 Windows Vista Administration 0 06-09-2008 11:00 AM
Batch files, administrator, network drives ToddAndMargo Windows Vista General Discussion 0 02-02-2008 04:08 AM
Running batch files as administrator change working directory corradolab@ngi.it Windows Vista General Discussion 1 01-07-2008 02:41 PM
Task Scheduler and Robocopy Batch Job bobneedshelp Windows Vista General Discussion 5 11-29-2007 03:28 PM



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 47 48 49 50 51 52 53 54 55 56 57 58 59