Link to home
Start Free TrialLog in
Avatar of gateguard
gateguard

asked on

The task completed with an exit code of (1).

On mycomputer, I have a batchfile named: computer_at.bat.

computer_at.bat has one line:

AT \\testcomputer 7:58 c:\tasks\computer.bat


On testcomputer, I have a folder named tasks and a file named computer.bat.

computer.bat has has one line:

echo "computer -> "%computername%" "%os% >> \\mycomputer\tasks\computers.txt

mycomputer has a shared folder named tasks, open to everyone.


If I submit the task computer.bat using the sheduling wizard (either locally or remotely), I get the result I want, namely a

line of text added to c:\tasks\computers.txt (on mycomputer) with the name of the computer and the operating-system (always

Windows NT, even though actually W2K!).

But if I submit the task computer_at.bat using computer_at.bat, I get this:

"At1.job" (computer.bat)
      Finished 8/11/2003 8:22:00 AM
      Result: The task completed with an exit code of (1).

I tried changing computer_at.bat to:

AT \\testcomputer 7:58 "c:\tasks\computer.bat"

That change did not help.

I notice that if I use the task wizard I must supply a password for the user account submitting the tasks but I don't see any

command line switches for doing the same thing.

What am I doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of Rob Stone
Rob Stone
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Adrian Dobrota
tried at -interactive ? (I think it's "-interactive", can't check now, no Windows around. ....hmmm..lucky me!!  ;-)
Avatar of gateguard
gateguard

ASKER

cmd /c

that's what worked

thanks
Do you receive any error messages if you run the task from the command line?
Wrong thread, sorry.