Hi Les,
Thanks for that.
I realized that when you have multiple network cards like in a laptop you need to query all of them to see which is connected.
The script now runs:

 Code:
Dim $defaultgw0
Dim $defaultgw1
Dim $defaultgw2
$defaultgw0 = EnumIPInfo(0,3)
$defaultgw1 = EnumIPInfo(1,3)
$defaultgw2 = EnumIPInfo(2,3)

If $defaultgw0 = '192.168.1.1' or $defaultgw1 ='192.168.1.1' or $defaultgw2 ='192.168.1.1'
call file.kix


Works a treat now and it works with laptops and desktop.

I see where you were coming from now.


Thanks!!


Edited by rhunton (2007-12-11 12:04 PM)