View Single Post
  #3  
Old 04-05-2005, 08:40 AM
wasodg2 wasodg2 is offline
Registered User
 
Join Date: Dec 2004
Location: Spokane, WAshington
Posts: 16
You could try the EXEC method from within vbScript, it has the capability to capture output from the command line. Kind of like the following example with the ping command.

StrComputer = "PlaceComputerNameHere"
Set Shell = CreateObject("WScript.Shell")
Set objScriptExec = Shell.Exec("ping -n 1 -l 5 -w 1000 " & strComputer)
Do While Not objscriptexec.Stdout.AtEndOfStream
str = objscriptexec.Stdout.ReadLine
If InStr(str, "timed out") Then
WScript.Echo StrComputer & " not responding"
End If
If InStr(str, "Reply from") Then
WScript.Echo StrComputer & " Computer On Line"
End If
Loop
Reply With Quote