
Returning code to the calling process?
Heya, Alex!
Thanks for the "heads up"! Yeah...I'm running on XP. After a few attempts
(mostly because of hidden "prompts"), I finally got it to work relatively
straightforwardly by using:
cscript C:\MyPath\MyScript.vbs //Nologo
I'm a little annoyed that you can't specify a file for the ActiveX aspect of
the Job. And it's only limited to ~3000 characters (my file was about 8000
characters). That's what prompted me to investigate launching it
"externally".
Thanks also to Windows Scripting Solution for the reference! :-)
Quote:
> Yes, that's it.
> The trick is that cscript is the only thing that "runs" inside the
> original command window; runnin a script via wscript spawns it as an
> independent process.
> if you trap your errors internally, you can also just use a
> wscript.echo to pass it out to a command line and capture it in your
> batch file.
> BTW, I have no clue how well this works on Win9x, if that matters for
> you; Windows Scripting Solutions is pretty NTish in focus.
> > Hello, all!
> > I've got a VBScript file that I'll be invoking from the command
> line:
> > cmd /C "MyScript.vbs".
> > I'm wondering how to return an error code from VBScript to the
> command
> > processor?
> > Any help would be greatly appreciated! :-)