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

Discussion in 'Windows Vista General Discussion' started by eganders, Aug 9, 2008.

  1. eganders

    eganders Guest

    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

    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, Aug 9, 2008
    1. Advertisements

  2. eganders

    eganders Guest

    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
    eganders, Aug 9, 2008
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.