WMI query Win32_PingStatus

Forums Desktop Info WMI query Win32_PingStatus

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
    • #1167
      Anonymous

      Hey Glenn,
      First, a big thanks for this awesome tool.

      Im trying to ping an ip adress and then get true or false as output.
      I guess Win32_PingStatus is the way to go for this.

      My line so far:

      WMI=active:1,interval:0,color:ccffcc,text:VPN,namespace:root\cimv2,query:Win32_PingStatus Where ” & _”Address = ‘ip goes here’,

      And that’s about it. I’ve tried different queryes with no luck. And im not shure how to display the output. Property:ProtocolAddressResolved?

      Sys info:
      Windows 10 Enterprise 64-biters Versjon: 17134.112
      Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
      Desktop Info version 1.5.1.874

      (getting latest version shortly)

      Thanks again for a great tool.

    • #1168
      Anonymous
    • #1169
      Anonymous

      Update:
      This “works” and gives output 0 for true:

      WMI=active:1,interval:0,color:ccffcc,text:VPN Status,namespace:root\cimv2,query:Win32_PingStatus Where Address = “172.19.208.250”,property:PrimaryAddressResolutionStatus

      Any idea how to make DI display tue or false instead?

    • #1172
      webmasterwebmaster
      Keymaster

      The boolean formatting seems unreliable against an integer result but the bitmap formatting will work. This relies on the StatusCode having an error in the 11000 range.

      Something like this:

      WMI=active:1,interval:60,color:ccffcc,text:VPN Status,namespace:root\cimv2,query:Win32_PingStatus Where Address = ‘172.19.208.250’,display:%StatusCode%[bit:11000:Not Available:Available]

      where a Status Code of 0 returns ‘Available” and a StatusCode in the range of 11000 returns ‘Not Available’

    • #1173
      Anonymous

      Hi Glenn. That’s just perfect!

      Version 1.11.0 opens up a whole new world of possibilities. Thank you!

      I’ll make sure to donate your work, if its possible?

Viewing 4 reply threads
  • The topic ‘WMI query Win32_PingStatus’ is closed to new replies.
Glenn's Page