Aacajo,

The UDFs that I referenced will work well ONLY if you can obtain the correct IP address. Take a look at the NICInfo() UDF - latest code on my web site. It will return the IP info (along with much other data) for every physical network adapter. It specifically ignores pptp type adapters, WAN adapters, Parallel adapters, and so on, so it might be the best choice to find the physical adapter's IP.

Pay close attention to the example in the code header, as the UDF returns an "array of arrays". you might try something like
 Code:
$aNIC = NICInfo()
For Each $Nic in $aNIC
  If Not InStr($Nic[0], 'VPN')         ; not a VPN adapter
    $IPSettings = Split($Nic[7], ',')  ; IP, Mask, Gateway *
    If IsInSubnet($IPSettings[0], $Networks)
      ; do stuff!
    EndIf
  EndIf
Next
* The IPSettings array might have multiple addresses separated by spaces.. if that's the case (which is very unlikely for workstations) you will need to split again and use the first IP.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D