using shell to exec dos app and redirect it's output 
Author Message
 using shell to exec dos app and redirect it's output

Hi,

        As part of my VB 4 app under win95/NT I need to ping a network
        machine to determine if it is online.  I want to use the
        ping command under dos to do this and have it's output
        redirected to a file from which I can read the results.

        I use the following command:

        retval = Shell("ping www.machine.com > ping.results", 1)

        The problem is that the ping.results file does not get created
        so I can't test the result of this command in my VB app.  It
        does work if I put the ping command in a batch file and execute
        the batch file using the Shell command, however, I would rather
        not do it this way.

        So does anyone know how to make this work or even if there is an
        easier way to ping a machine in VB and obtain the result.  If it
        can't be done without the use of an ocx then are there and
        cheap/freeware ping tools out there?

        Amar K.



Fri, 29 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Probs with redirecting output of a shell started DOS-App to a file

2. Redirected Output From DOS Shell In Visual Basic 6

3. shell with dos tool output redirected to a file

4. Redirecting output from a SHELLed DOS Box

5. VB: How do I redirect (capture) a dos-prompt's output

6. Capture output of shelled DOS APP

7. Capturing DOS app output from the Shell() function

8. closing dos app's window after shell

9. Why can't program send keys to a dos shelled app

10. Redirecting the output of a DOS application to my .NET application

11. Please help: redirecting output of shell started program

12. redirect output of program run with shell command

 

 
Powered by phpBB® Forum Software