Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

Network Connectivity Detection

  • Filter
  • Time
  • Show
Clear All
new posts

  • Network Connectivity Detection

    Hello, does anyone know how to write code to detect when a machine receives network connectivity? (Other than sending out random pings - I'd like to use native Windows autosense or something of that nature...).
    The purpose is to have a script run as soon as network connectivity is detected. The scripting language is not as important as what the best method for detection is.


  • #2
    What is your target OS ?
    With XP you can get around with WMI:

    For 2000 I am not aware of anything other than pinging...
    Guy Teverovsky
    "Smith & Wesson - the original point and click interface"


    • #3
      The target OS is XP. The script is to be run on a local computer to see if it has network connectivity. I found some white papers on the System Event Notification Service (SENS) API, but alas, it 's alittle over my head...


      • #4
        A simpleminded approach is to check if the machine has an IP address. The cleanest way to do that is through WMI, but an old-fashioned 'ipconfig' will do. If you need to be sure, ping the gateway as wel...