R
RD
I'm planning to modify existing scripts which check whether system is alive.
I'm thinking of using win32_PingStatus instead of ping.exe. However I
couldn't find one option in WMI object which ping.exe uses and that is "-n
Count : Specifies the number of Echo Request messages sent. The default is
4.". I couldn't find matching property in wmi object. Does win32_pingstatus
uses count= 1? Can I invoke object in VBScript more than one time to
increment the nos. of echo request sent.
Would following code be similar to ping -n 4 ...
for i=0 to 3 ' Defualt echo request in ping.exe is 4.
GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("select * from Win32_PingStatus where Address = strhost ...)
Next
I'm thinking of using win32_PingStatus instead of ping.exe. However I
couldn't find one option in WMI object which ping.exe uses and that is "-n
Count : Specifies the number of Echo Request messages sent. The default is
4.". I couldn't find matching property in wmi object. Does win32_pingstatus
uses count= 1? Can I invoke object in VBScript more than one time to
increment the nos. of echo request sent.
Would following code be similar to ping -n 4 ...
for i=0 to 3 ' Defualt echo request in ping.exe is 4.
GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("select * from Win32_PingStatus where Address = strhost ...)
Next