Re: Online Test
From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 05/09/04
- Next message: Torgeir Bakken \(MVP\): "Re: Online Test"
- Previous message: Mark Roberts: "Re: HELP - SESSION VARIABLES"
- In reply to: Russ_S-K: "Online Test"
- Next in thread: Torgeir Bakken \(MVP\): "Re: Online Test"
- Reply: Torgeir Bakken \(MVP\): "Re: Online Test"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 9 May 2004 16:10:49 -0600
"Russ_S-K" <anonymous@discussions.microsoft.com> wrote in message
news:4E960996-C198-477C-931A-0D42E87E4BB9@microsoft.com...
> I was wondering if there is a better test to determine if a PC is online
than the one I am using. Using ping seem to be a rather crude way. Here is
the code I use:
>
> iPing = oShell.Run( "cmd /c ping -n 2 -w 50 " & sComputer & _
> " | find /i ""Reply from"" ", 0, TRUE )
> If iPing <> 0 Then
> wScript.Echo sComputer & " is not currently online."
> End If
Almost any method for communicating with a remote computer is going to have
some issues when the remote computer fails to respond, resulting in even
more time wasted than waiting for ping responses to time out.
You could write a WMI script, for example. But the nature of the
communications involved in that scenario is more detailed than a ping, and
relies more heavily on processing being done by the remote system. I have
not timed it myself, but I would be surprised if it takes less time for a
WMI script to determine that a system is not there.
/Al
- Next message: Torgeir Bakken \(MVP\): "Re: Online Test"
- Previous message: Mark Roberts: "Re: HELP - SESSION VARIABLES"
- In reply to: Russ_S-K: "Online Test"
- Next in thread: Torgeir Bakken \(MVP\): "Re: Online Test"
- Reply: Torgeir Bakken \(MVP\): "Re: Online Test"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|