Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.

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
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

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]

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

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.

share|improve this answer

Your Answer


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.