Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
1029usr078198
Posted - December 29 2007 : 10:37:35 Here's a Visual Basic, Scripting Edition version of a "Ping Sweep". A ping sweep finds all the IP addresses in use in a particular range.
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