query re batch/script or combination which passes status/failure correctly back to SMS 2003
I'm wondering how to get any script/batch to correctly pass failed status back to SMS 2003 ??
ie any script/batch or combination or script/batch always runs & thus is alway successfull if called/run from a package in SMS 2003 & thus to SMS 2003 is always a success
How can I get SMS 2003 to recognise a script/batch as failed if any component of the batch/script fails ??
ie any script/batch or combination or script/batch always runs & thus is alway successfull if called/run from a package in SMS 2003 & thus to SMS 2003 is always a success
How can I get SMS 2003 to recognise a script/batch as failed if any component of the batch/script fails ??
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
I don't know how SMS tests for success or failure but can I suggest setting the DOS ERRLEVEL if using batch files or if using VBS, exit with a suitable value, using "WScript.Quit(some_value)". For example, if SMS tests for a non-zero return code to indicate failure, then use "WScript.Quit(1)" for that and "WScript.Quit(0)" for success.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.