Finding the default internet connection...

  • Thread starter Thread starter ricolee99
  • Start date Start date
R

ricolee99

Hi Everyone,

Thanks for reading my post. Can someone please tell me if there's
something that will tell me the name of the default internet connection
(ie.) thru registry or thru command line)? I have two types of
connections: LAN and dial up (3 different ISPs), I would like to
determine what the user has for default connection. I'm trying to do
this programmatically and I can't find an API that will allow me to do
this, that's why I"m hoping I can find it in the registry or command
line.

Thanks in advance

Rico
 
(e-mail address removed) wrote in
Thanks for reading my post. Can someone please tell me if there's
something that will tell me the name of the default internet
connection (ie.) thru registry or thru command line)? I have two
types of connections: LAN and dial up (3 different ISPs), I would
like to determine what the user has for default connection. I'm
trying to do this programmatically and I can't find an API that
will allow me to do this, that's why I"m hoping I can find it in
the registry or command line.

From the command line, enter the command:
route print
In the table, look for the destination "0.0.0.0" -- that is your
default route. If there are more than one line with that destination,
then the line that has the lowest number in the "metric" column will be
the current default connection.

HTH,
John
 
Back
Top