View previous topic :: View next topic |
Author |
Message |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Tue Jun 17, 2008 10:51 am Post subject: How to set errorlevel from batch file |
|
|
User Question:
Is there something that can be placed in a bat file that will cause automize8 to receive an exit code greater the 0. We have batch files that is detection errors but the batch file is running correctly so automize8 thinks everything finishes fine so it issues a 0 exit code. |
|
Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Tue Jun 17, 2008 10:53 am Post subject: |
|
|
use the exit command at exit points in your batch file.
DOS help for exit
exit /?
Quits the CMD.EXE program (command interpreter) or the current batch
script.
EXIT [/B] [exitCode]
/B specifies to exit the current batch script instead of
CMD.EXE. If executed from outside a batch script, it will quit CMD.EXE
exitCode specifies a numeric number. if /B is specified, sets
ERRORLEVEL to that number. If quitting CMD.EXE, sets the process exit code with that number. |
|
Back to top |
|
 |
|