Detect Gateway IP address in windows

Mark Wieder mwieder at ahsoftware.net
Fri Oct 8 12:27:09 EDT 2004


RGould8-

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 ahsoftware.net



More information about the use-livecode mailing list