hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set errorlevel from batch file

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Command tasks and commandline
View previous topic :: View next topic  
Author Message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Tue Jun 17, 2008 10:51 am    Post subject: How to set errorlevel from batch file Reply with quote

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
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Tue Jun 17, 2008 10:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Command tasks and commandline All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group