We have several wireless networks, some of them, doesn't need a proxy, some of them do. Furthermore, when some of our users go to other places, they need to change their proxies. Most of our users are not that well versed with computers.

I'd like to minimize the need for them to manually change this settings, as I've already done with their wireless connections.

Is there an existing program to set an specific wireless network to a certain fixed proxy configuration?

If there isn't, do you know if the necessary API exists to change it with a script or small application?

  • I think I found a dupe serverfault.com/questions/17976/… , but it's not exactly what I need. This should work on networks outside my control. I've tried changing the Registry Keys for the proxy, and it requires an IE start and close for other browsers to see the change.
    – voyager
    Jun 4 '09 at 0:59
  • Yes. This is what you're looking for. Proxy auto-config is your friend. smile Jun 4 '09 at 1:06
  • What doesn't work about proxy auto-config for your application? (Bear in mind that you can control proxy auto-config thru a DHCP option, as well as thru the DNS-based mechanism or by explicitly specifying an autoconfiguration script on the client.) Jun 4 '09 at 1:07
  • Some of the wireless networks the users connect are under my control, those have a transparent proxy, some are from outside companies, which in most cases, use manual proxy configuration. What I want is that when the wireless network connection is established, the correct manual proxy configuration is loaded.
    – voyager
    Jun 4 '09 at 1:24

Okay-- I see what you're saying now.

In theory, you could write a service that registers with the "Network Location Awareness" service (http://msdn.microsoft.com/en-us/library/ms739931(VS.85).aspx - available on WinXP and up, I believe). This is exactly the type of thing that NLA was added to the Windows OS for.

This wouldn't be a simple little VBScript thing, but it wouldn't be that much coding either. I don't have the spare cycles right now to work on it, but maybe somebody could pick up the idea and run with it. Being able to register programs to execute based on NLA notifications would be very useful.

Gosh-- there's even sample code! http://www.microsoft.com/downloads/details.aspx?familyid=ef8a6228-f11d-4ba0-b73e-dd8dc7dd11e8&displaylang=en

As a quick-and-dirty fix, you could replace the "Internet Explorer" shortcut with one that ran a script to detect the IP subnet the computer has obtained an IP address from and set the appropriate proxy setting. I'd have to test that w/ already-open IE windows to see how it reacted... (poorly, I'd suspect).

That's a real hack, though.

Okay-- one other stupid hack idea. (Giggles...) You could run a proxy on each machine, configure IE and other software to use the local proxy, and then automate the configuration of the local proxy (possibly based on NLA like I described above). That would get around IE acting poorly if the registry-based proxy setting changed out from under it.

It'd be nice if the people who ran the networks that are outside your control just used proxy auto-config.


You might try transparent proxying. Very handy.


  • The poster has clarified that some of the networks are outside of his control and require manual proxy configuration. Jun 4 '09 at 3:07

The only thing I can think of is to set their IE / Firefox / (Browser here) to "Auto Detect Proxy Setting for Network" from the computer/laptop.


You could try implementing WPAD

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