Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Vbscript Exit Code

$
0
0

Hello,

i'm using a software that is automatically running Vbscripts and prints out the output. i want the software

to print out the same message each time the script fails to run, due to a VBScript runtime error. the software runs the script as a command, like this:

cscript c:\script.vbs Hostname.

 does anyone know what Exit Code does vbscript use when it fails to run? i don't need to know the exact value, just different from X.

up until now i i used a comparison to 0. if the exit code is different then 0 i printed out the failed message, but it looks like vbscript returns 0 as exit code even if it fails to run. is that possible and does anyone have a solution?

Thanks.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>