How to Quickly Switch Between Tethering and Home Connections
Here's a simple way to quickly switch between your home cable/dsl connection and your tethering connection. Just make a batch file for toggling the appropriate connections. Make sure you ENABLE ADMINISTRATOR MODE by right-clicking the icon -> Shortcut Tab -> Advanced button at bottom -> Check Run as Administrator. Then make a folder with shortcuts, and add that folder to your taskbar via right clicking the taskbar -> toolbars -> new toolbar then find the folder. Add icons to the shortcuts and you're good to go.
I've pasted the code below. Just REPLACE network_to_enable and network_to_disable with the names of your network. You can find the names of your network under Network and Sharing Center -> Change Adapter Settings. It's the text in black above and to the right of the icon.
As a bonus, for enabling tethering, I created code to kill any bandwidth-intensive programs such as uTorrent. Feel free to modify this and add your own programs. The batch file will also open whatismyip.com so you can id and log your IP address. Again, replace the network_to_enable and network_to_disable with the names of your networks.
Hope this helps someone!
Batch File 1 - Enable Cable/DSL Connection: Code: @echo off
set network_to_enable=Ethernet
set network_to_disable=iPhone
netsh interface set interface name="%network_to_enable%" admin=enabled
netsh interface set interface name="%network_to_disable%" admin=disabled Batch File 2: Code: @echo off
taskkill /f /im "uTorrent.exe"
set network_to_enable=iPhone
set network_to_disable=Ethernet
netsh interface set interface name="%network_to_enable%" admin=enabled
netsh interface set interface name="%network_to_disable%" admin=disabled
timeout 5
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" " http://www.whatismyip.com/" |