Hi all,

I'm using the following way to run a script from within my VB6 app:

Code:
With CreateObject("wscript.shell")
            AllocConsole
            ShowWindow GetConsoleWindow, SW_HIDE
            
            commandExec = "cmd /c myscript"
            With .exec(commandExec)
            
                line = .stdout.readall
end with
"myscript" can be a batch or a Perl script. It returns exit code. How can I read this exit code from within my app?

Thanks in advance!