[windows2000] Re: Multiple arguments in a batch

  • From: "Costanzo, Ray" <rcostanzo@xxxxxxxxxxx>
  • To: "'windows2000@xxxxxxxxxxxxx'" <windows2000@xxxxxxxxxxxxx>
  • Date: Tue, 10 Sep 2002 15:40:50 -0400

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.


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.


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


Other related posts: