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 ??
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


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.
Answered 08/26/2008 by: VBScab
Red Belt

Please log in to comment