Home All Groups Group Topic Archive Search About

Tray icon to change IP Gateway?

Author
19 Jan 2006 5:01 AM
Noozer
How to change IP Gateway simply?

Just looking for some sample code... Could be VB6 or VB Net 2005....

I want to have a Tray icon. When double clicked it changes the TCPIP gateway
to a secondary choice. Double click again and it's back to the original
setting.

Thx!

Author
19 Jan 2006 6:38 AM
Simon Verona
You could simply run the shell command to execute the command line route
command.

to change the route from the command line it's something like :

route CHANGE 0.0.0.0 192.168.1.254 METRIC 2

so (untested) you can :

shell("route CHANGE 0.0.0.0 192.168.1.254 METRIC 2") to change the route.

Regards
Simon
"Noozer" <dont.spam@me.here> wrote in message
news:y2Fzf.271996$2k.54336@pd7tw1no...
Show quoteHide quote
> How to change IP Gateway simply?
>
> Just looking for some sample code... Could be VB6 or VB Net 2005....
>
> I want to have a Tray icon. When double clicked it changes the TCPIP
> gateway to a secondary choice. Double click again and it's back to the
> original setting.
>
> Thx!
>