/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


query re batch/script or combination which passes status/failure correctly back to SMS 2003

08/25/2008 2383 views
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   [ + ] Show comments

Comments


Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

All Answers

0
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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ