[windows2000] Re: Multiple arguments in a batch

  • From: Jonathan Chan <jchan@xxxxxxxxxxxxx>
  • To: windows2000@xxxxxxxxxxxxx
  • Date: Tue, 10 Sep 2002 13:16:36 -0500

At 08:06 AM 9/10/2002, you wrote:
>I do know VB Script.  I just didn't know of any way to ping an IP address or
>get a shell response back to my script.  Like "strReturn =
>objShell.Run("cmd.exe /c ping -n 1 domain.com") but it doesn't really work
>that way...  The only other thing I could think to do is pipe the ping
>results to a text file and read it with the file scripting object then.
>Doesn't matter really.  Thanks.
>Ray at work

try this:

Dim shell
Set shell = CreateObject("WScript.Shell")

strReturn = Shell.Run("ping jchan", 1, true)
'msgbox strReturn

if strReturn = false then
    do whatnot

To Unsubscribe, set digest or vacation
mode or view archives use the below link.


Other related posts: