Question

How do I return an exit code from a VBScript console application

I Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do I, return an int return value to indicate success or failure?

 45  93195  45
1 Jan 1970

Solution

 64

Try:

WScript.Quit n

Where n is the ERRORLEVEL you want to return

2008-10-09

Solution

 36

I found the answer :0)

 DIM returnValue
 returnValue = 99
 WScript.Quit(returnValue)

This seems to work well.

2008-10-09