I personaly would use Richard's IpDecimal() UDF for this stuff.

and the following code.

Code:

$IP=EnumIPInfo(0,0)
$Mask=EnumIPInfo(0,1)

Select
case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.0"
;you are in the 192.168.1.0 subnet

case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.2"
;you are in the 192.168.1.1 subnet

case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.3"
;you are in the 192.168.1.2 subnet

case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.4"
;you are in the 192.168.1.3 subnet
endselect