Do While Not objExecObject.StdOut.AtEndOfStream strText = objExecObject.StdOut.ReadAll() If Instr(strText, "Reply") > 0 Then
' ===================================================================== ' Insert your code here ' =====================================================================
Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * From Win32_OperatingSystem") For Each objItem in ColItems Wscript.Echo strComputer & ": " & objItem.Caption Next
' ===================================================================== ' End ' =====================================================================
Else Wscript.Echo strComputer & " could not be reached." End If Loop Next