win7:quick way to change proxy and network adaptor settings (DNS)

KSINGH

Executive Member
Joined
May 5, 2008
Messages
6,997
Reaction score
8
Location
PTA
my office laptop, toshiba R940, needs to have its DNS settings and proxy server switched every time change location/connection. its a bit annoying. is there a quick way to switch settings?
 
Instead of installing another application you could always use a script...
 
Instead of installing another application you could always use a script...

It's easier with NetSetMan (or other similar programs) since you can create profiles, with different ip/settings etc and easily switch between them.
 
If you use Chrome, Proxy Switchy works great, just not the DNS (although that should be set to automatic, right ?)
 
If you use Chrome, Proxy Switchy works great, just not the DNS (although that should be set to automatic, right ?)
its set to auto for the office but for mweb i need to change it. :confused:
 
You can copy and paste the batch scripts below and save as a .bat file

Proxy Off:
Const HKEY_CURRENT_USER = &H80000001

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"

strValueName = "ProxyEnable"
dwValue = 0
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue

Proxy On:
Const HKEY_CURRENT_USER = &H80000001

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"

strValueName = "ProxyEnable"
dwValue = 1
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue

The above scripts will turn the proxy on or off, but don't change DNS settings.
You can go into your adaptor settings in Network and Sharing Center, Local area connection properties, Internet protocol version 4 (TCP/IPv4) and set the DNS settings on the alternate configuration tab. This will then use the alternate settings when not on the company network.
 
Last edited:
You can copy and paste the batch scripts below and save as a .bat file

Proxy Off:


Proxy On:


The above scripts will turn the proxy on or off, but don't change DNS settings.
You can go into your adaptor settings in Network and Sharing Center, Local area connection properties, Internet protocol version 4 (TCP/IPv4) and set the DNS settings on the alternate configuration tab. This will then use the alternate settings when not on the company network.

thanks man! it seems i have to be on auto for the office. hence how do i set that as alternate?
 
thanks man! it seems i have to be on auto for the office. hence how do i set that as alternate?
You will have to try to see which way works better, i.e. leave the General settings as auto and set the alternate settings as needed. If that doesn't work, then try with setting the required TCP/IP settings as the General settings, and leave the alternate as auto.
 
You will have to try to see which way works better, i.e. leave the General settings as auto and set the alternate settings as needed. If that doesn't work, then try with setting the required TCP/IP settings as the General settings, and leave the alternate as auto.

ok will try that
 
Top
Sign up to the MyBroadband newsletter
X