Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There are a number of users in our organization that use their laptops on multiple networks. Each network has its own proxy setting requirements for accessing the Internet and currently, the users must manually change these settings in Internet Settings whenever moving to a different network.

Is it possible to script the changes so that the user can just run the appropriate script for the network they're on?

This is primarily for Windows XP but might also be required for Vista and Windows 7.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Look into proxy auto-config scripts. You can script changes to the Windows registry to select a different proxy server, but you'll really like proxy auto-config scripts and how they work on your client computers.

http://en.wikipedia.org/wiki/Proxy_auto-config

I moved to proxy auto-config files for my school district Customer a couple of years ago as a result of administrators taking laptops off-site and trying to work on other networks that didn't need an HTTP proxy specified. It's worked like a charm, and is a nice cross-browser and cross-platform compatible solution.

share|improve this answer
    
This sounds ideal - I'll look into it. –  Jeff Yates Jun 2 '09 at 18:09
1  
I will drop in and second this solution, - it really is as ideal as it gets, no more registry hacking, no more manual changes. It just works. –  shylent Jun 2 '09 at 18:17
    
This worked great, by the way, once I got it set up. –  Jeff Yates Jul 8 '09 at 21:15
    
Boo-yeah! Proxy autoconfiguration is "the bomb". –  Evan Anderson Jul 8 '09 at 21:23

There are a couple different ways to do this, but I would personally looking at applying a GPO that would run a logon script. This script would look at the subnet the user was in, and apply the appropriate proxy setting. This website describes the place in the registry where the change would have to be made.

http://www.computing.net/answers/networking/changing-ie-proxy-via-login-script/22498.html

share|improve this answer

Microsoft kb 819961 is a good starting point.

The registry settings for the browser are located here.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"MigrateProxy"=dword:00000001
"ProxyEnable"=dword:00000001
"ProxyHttp1.1"=dword:00000000
"ProxyServer"="http://ProxyServername:80"
"ProxyOverride"="<local>"

It should be pretty easy to build a vbs or powershell script to automatically update the registry.

share|improve this answer
    
Ah, I didn't even think about the registry - no idea why. Thanks! –  Jeff Yates Jun 2 '09 at 18:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.