Hey guys I gotta quick question hopefully someone will have the answer to this. I have this VB Script all it does is displays memory information.
strComputer = "192.168.1.1"
Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")
For Each wbemObject In wbemObjectSet
WScript.Echo "Total Physical Memory (kb): " & wbemObject.TotalPhysicalMemory
Next
Now what I would like to do is before it runs the script. I would like it to first ping the IP 192.168.1.1 (strComputer) if it's alive then continue. But if it's dead then display message No Connection.
Any help is appreciated.
Thanks
ScarEye
strComputer = "192.168.1.1"
Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")
For Each wbemObject In wbemObjectSet
WScript.Echo "Total Physical Memory (kb): " & wbemObject.TotalPhysicalMemory
Next
Now what I would like to do is before it runs the script. I would like it to first ping the IP 192.168.1.1 (strComputer) if it's alive then continue. But if it's dead then display message No Connection.
Any help is appreciated.
Thanks
ScarEye