getting output of command line exe 
Author Message
 getting output of command line exe

Hi,

in a vbs script that I start with cscript, I start a command line exe using

set shell = CreateObject("WScript.Shell")
command = "myprog.exe" + myparameters
return = shell.Run(command, , TRUE)

A dos box pops up and the exe starts, all fine.

It can happen now, that the exe encounters an errors an prints info I need
to stdout and stderr.

But the Dos box is closed immediately after the exe exits, so I cant see the
info. I tried to redirect stdout and stderr to a file, but no file was
generated, and run seems to have no options for this.

Does anybody have an idea??

Thanks,

Stefan



Tue, 29 Apr 2003 03:00:00 GMT  
 getting output of command line exe
Search the newsgoup for "comspec"...

It seems like this question gets asked/answered nearly every day in one of the
...public.scripting... NGs.  I just got 56 hits in this NG alone...

--
Michael Harris
Microsoft.MVP.Scripting
--


Quote:
> Hi,

> in a vbs script that I start with cscript, I start a command line exe using

> set shell = CreateObject("WScript.Shell")
> command = "myprog.exe" + myparameters
> return = shell.Run(command, , TRUE)

> A dos box pops up and the exe starts, all fine.

> It can happen now, that the exe encounters an errors an prints info I need
> to stdout and stderr.

> But the Dos box is closed immediately after the exe exits, so I cant see the
> info. I tried to redirect stdout and stderr to a file, but no file was
> generated, and run seems to have no options for this.

> Does anybody have an idea??

> Thanks,

> Stefan



Tue, 29 Apr 2003 03:00:00 GMT  
 getting output of command line exe

Quote:

> Search the newsgoup for "comspec"...

> It seems like this question gets asked/answered nearly every day in one of the
> ...public.scripting... NGs.  I just got 56 hits in this NG alone...

Um, I may be doing something wrong but I'd be interested in the
answer too and I couldn't find "comspec" in messages in this
group searching with two different tools.

Is there a FAQ which contains this FAQ somewhere? :)

thanks,
gary



Tue, 29 Apr 2003 03:00:00 GMT  
 getting output of command line exe
Unless you download message bodies and not just headers, you won't find anything.

In that case, use:

Deja.com: Power Search
http://www.deja.com/home_ps.shtml

with forum: microsoft.public.scripting.*

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:


> > Search the newsgoup for "comspec"...

> > It seems like this question gets asked/answered nearly every day in one of the
> > ...public.scripting... NGs.  I just got 56 hits in this NG alone...

> Um, I may be doing something wrong but I'd be interested in the
> answer too and I couldn't find "comspec" in messages in this
> group searching with two different tools.

> Is there a FAQ which contains this FAQ somewhere? :)

> thanks,
> gary



Tue, 29 Apr 2003 03:00:00 GMT  
 getting output of command line exe

Quote:


> > Search the newsgoup for "comspec"...

> > It seems like this question gets asked/answered nearly every day in
> > one of the ...public.scripting... NGs.  I just got 56 hits in this
> > NG alone...

> Um, I may be doing something wrong but I'd be interested in the
> answer too and I couldn't find "comspec" in messages in this
> group searching with two different tools.

> Is there a FAQ which contains this FAQ somewhere? :)

> thanks,
> gary

For example, see ...

               Subject: Re: getting output of command line exe
                  Date: Fri, 10 Nov 2000 10:36:54 -0500

over in .VBScript.  (And, that's not the only one)

Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/



Tue, 29 Apr 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. getting output of command line exe

2. Exe ASP from command line

3. Trouble using blat.exe or command-line mailer in a vbscript

4. Exe ASP from command line

5. end task Outlook.exe from command line?

6. Passing values into and out of Command Line application *and* command line prompt in vbscript

7. Scripting command line applications & Command Line Prompting

8. Capture output from command line program

9. Redirecting run command line output from VBScript

10. Capturing command-line output

11. Write output to command line

12. Capturing command line output

 

 
Powered by phpBB® Forum Software