' some used variables dim arrPCs() dim SinglePC dim PClist dim counter, i, j ' text file containing computer names to be checked PCList = "PCList.txt" ' read computer names from text file set objFSO = CreateObject("Scripting.FileSystemObject") Set objListFile = objFSO.GetFile(PCList) counter = 0 if objListFile.Size <> 0 Then Set objListFile = nothing Set objListFile = objFSO.OpenTextFile(PCList, 1) counter = 0 Do While objListFile.AtEndOfStream <> True counter = counter + 1 redim preserve arrPCs(counter) line = trim(objListFile.Readline) arrPCs(counter) = line Loop objListFile.Close ' list file is empty else Set objListFile = nothing redim preserve arrPCs(0) end if for i = 1 to counter strComputer = ucase(arrPCs(i)) ' ping PCs Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}")._ ExecQuery("select * from Win32_PingStatus where address = '"_ & strComputer & "'") For Each objStatus in objPing ' PC doesn't respond If IsNull(objStatus.StatusCode) or objStatus.StatusCode <> 0 Then wscript.echo strComputer & ": PC doesn't respond to ping" ' PC responds Else Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & _ "\root\cimv2\Applications\MicrosoftIE") Set colIESettings = objWMIService.ExecQuery _ ("Select Version from MicrosoftIE_FileVersion Where File='iexplore.exe'") For Each strIESetting in colIESettings Wscript.Echo strComputer & ": IE Version on PC: " & strIESetting.Version Next End If Next next