|
Run a script from the command line
|
|
|
|
| Start button / programs / accessories / command prompt.
|
| At the command prompt type:
|
|
|
| admwin /sb "c:\hello world.cnu" /alldata
|
|
|
| Now you should see the same two messenger service dialogs as in create and run a basic script.
|
| At the command prompt type:
|
|
|
| type batch.log
|
|
|
| The file batch.log always contains the output of the latest job when a script is executed from the command line.
|
|
|
| As you can see it here says "All OK." - everything went fine.
|
|
|
|
| SetupBatcher sets the %errorlevel% environment variable to a non-zero value when a script fails - if you call SetupBatcher from another program, first check %errorlevel%, if non-zero then check the contents of the batch.log file.
|
|
|
| It is also possible to perform any command when an error occurs by using the OnError section, see the previous tutorial how to execute commands when an error occurs.
|