I have two networks at work and when I have to use my Wireless settings I need IE to use one set of Proxy LAN Settings, and when I am plugged in I need a different set.

I have been looking for a way to script in the Proxy Settings:

HTTP, FTP and Secure

I also need the "exemptions"

I can't buy anything....my company is in a buying pinch. And my IT guys groaned when I asked if I could install FireFox...because I was going to use Firefox for Wireless, IE for LAN....but they yelled at me.

Edit: I can't install anything for this. This is a "non issue" to my IT guys.
Edit: I have IE 8 installed

  • Let me quess: you're not allowed to install any software to do this? – Ivo Flipse Jul 30 '09 at 14:16
  • Oh and what version of IE do you have? – Ivo Flipse Jul 30 '09 at 14:17
  • Owh did I mention that you probably need admin settings to get the "cool" solutions? – Ivo Flipse Jul 30 '09 at 14:21


Almost all programs these days keep their settings within the registry somewhere. So if it is in the registry and you want to automate it you are in luck.

The first step is to find the registry keys that contain the specific configuration that you are going to automate. Once you have the registry keys identified, export those keys to a REG file type. Then write yourself a script which will call the .REG file from the command line.

The example REG file content below thanks to Ivo


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

An example to actually put the contents of the REG file within the registry is...

C:> REGSRV32 myregsettings.REG

If it prompts you for a response such as a Y/N question use the following example instead

C:> REGSRV32 myregistrysettings.REG < yes.txt

where yes.txt is you should create a text file which contains the Y character and a carriage return to complete the response.

| improve this answer | |

Now I really hate network settings, so I can't guarantee it works.

Push the Browser Settings in the Login Script (for Internet Explorer)

Internet Explorer stores proxy settings in the registry. This makes it particularly easy to update, using a variety of methods. Even if your users do not normally use Internet Explorer as their usual browser, you will want to configure the proxy settings because many other applications key off proxy settings in Internet Explorer.

In this method, you determine the proper registry key for your version of IE, export the settings to a .REG file, and then use REGEDIT in the login script to push the settings to the PC.

To create the SETPXY.REG file, open notepad & type in as follows:

REGEDIT4 (or whatever version of REGEDIT is on your PC, such as REGEDT32)
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"="<your proxy IP address>:8080"

Change to the private IP address of your HTTP Proxy, and to or any combination of URL's for which you want to bypass the proxy. (I advise you to experiment with this for a while to get the syntax done correctly).

Check this Knowledge Base post for more info on the registry part.

| improve this answer | |

For little money there is Mobile Net Switch which can manage whole network setting profiles including proxy settings. I use it for some time and could not find any better (free) software.

| improve this answer | |

You should try a pac file. I asked this question on ServerFault.com.

Here is the answer I 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.


Make a EnableProxy.bat file with the following content:

@reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyEnable /t REG_DWORD /d 1

and DisableProxy.bat

@reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyEnable /t REG_DWORD /d 0

This will just enable/disable the proxy, if you'd like to also change server address add another line to EnableProxy.bat

@reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyServer /t REG_SZ /d your.proxy.server

Using REG enables you to change individual settings in a silent manner (/f switch) and it requires no UAC prompt (probably because this example only modifies HKCU).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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