Detect Gateway IP address in windows

Mark Wieder mwieder at
Fri Oct 8 11:27:09 CDT 2004


Friday, October 8, 2004, 7:36:27 AM, you wrote:

Rac> I've seen techniques for retrieving the user's local IP address in Windows
Rac> into a Revolution variable, but I haven't yet seen an example of how one goes
Rac> about retrieving the "gateway ip address".   (For example, the IP address of a
Rac> DSL router connected to the PC.)   Can anyone tell me how one could retrieve
Rac> this info in Windows?

Depends. On Win2k and XP with one connection,

on mouseUp
  local ipStuff, pos
  put shell("ipconfig") into ipStuff
  put the last word of ipStuff
end mouseUp

I think it's "winipconfig" under Win95. Also, if you have multiple
connections (DSL, modem) you will find both of those listed in ipStuff
and you'll have to parse through to find the one you're interested in.

-Mark Wieder
 mwieder at

More information about the use-livecode mailing list