
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.