[windows2000] Re: Multiple arguments in a batch

  • From: Aaron Dokey <adokey@xxxxxxxxxxxx>
  • To: "'windows2000@xxxxxxxxxxxxx'" <windows2000@xxxxxxxxxxxxx>
  • Date: Tue, 10 Sep 2002 15:45:19 -0400

Is there a VB script function to do pings?  I know with perl this wouldn't
be too hard.

-Aaron

-----------------------
Aaron Dokey - MIS
Reid Tool Supply
2265 Black Creek Rd.
Muskegon, MI   49444 
(231) 777-3951
(231) 767-3772 (Direct)
-----------------------

-----Original Message-----
From: Costanzo, Ray [mailto:rcostanzo@xxxxxxxxxxx]
Sent: Tuesday, September 10, 2002 3:41 PM
To: 'windows2000@xxxxxxxxxxxxx'
Subject: [windows2000] Re: Multiple arguments in a batch



Hi Jonathan,

This almost works.  Like, if the name can't be resolved, I'll get a false
return, but if the name is resolved but the response times out, I'll get a
true returned where I'm looking for a false.  I'll probably just suck it up
and pipe the output to a file.  This is only so that I can have my home
server ping my website while I'm at work and e-mail me if there's a problem.

Thanks,

Ray at work

> -----Original Message-----
> From: Jonathan Chan [mailto:jchan@xxxxxxxxxxxxx] 
> 
> 
> 
> 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
> endif
> 
> 
> 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

http://thethin.net/win2000list.cfm

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

http://thethin.net/win2000list.cfm

Other related posts: