• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 16556
  • Last Modified:

Internet explorer proxy changes via registry via batch file


We use a proxy at work so on my laptop I have to easily switch between telling Internet explorer to use a proxy (at work) and not use a proxy (at home or at a hotel).

I do this with two simple batch files, on.bat and off.bat.  

Everything works great but I lose the exceptions listed in the ADVANCED tab (tools/internet options/connections/lan settings/advanced) when I run the batch files.  I put servers in here which I never want to use the proxy for even if I am configured for a proxy.  

My question is this, what can I add to be ON.BAT proxy to add my bypass list?  As an example, just use:
as my exception list

My batch files look like this:

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "<local>" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d "atlproxy.test.com:8080" /f

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
  • 2
1 Solution
Lotus30306Author Commented:
Looks like IE stores this in the registry under "ProxyOverride".  I just need to know the exact line to add to my on.bat file to add "*.test.com;192.*;100.100.1.*" as my proxy overrides.  Thanks!
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "*.test.com;192.*;100.100.1.*;<local>" /f
or check this previous question i answered with more detail.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now