Proxy IE Exceptions

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 14 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
casaestrada
Posts: 15
Last visit: Tue Jun 12, 2012 10:56 am

Proxy IE Exceptions

Post by casaestrada »

I am trying to create an HTA for my users to check if they have
IE proxy enabled
most importantly if they have IE Exceptions..

if no to both it will automate this for them.

I found out how to do first part but can't get IE exceptions auto populated.

Code: Select all

<html>  
<head>  
<title>Proxy Switcher</title>  
<hta:application   
   id="switchproxy"  
   applicationName="Proxy Switcher"  
   border="dialog"  
   borderStyle="Complex"  
   caption="yes"  
   contextMenu="yes"  
   icon=""  
   innerBorder="yes"  
   maximizeButton="no"  
   minimizeButton="yes"  
   navigable="yes"  
   scroll="no"  
   scrollFlat="no"  
   selection="yes"  
   showInTaskBar="yes"  
   singleInstance="no"  
   sysMenu="yes"  
   version="1.0"  
   windowState="normal"  
 >
</head>  
 <script language="vbscript" >  
    Sub curproxy  
    Dim WshShell, bKey  
    Set WshShell = CreateObject("WScript.Shell")  
    regkey="HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsProxyEnable"
    If WshShell.RegRead(regkey)=0 Then  
        proxydisabled.checked=True  
        proxyenabled.checked=False  
        bthchangeproxy.Value="Enable Proxy"  
        window.status="Your IE session is not configured to use a proxy server"  
    Else  
        proxydisabled.checked=False  
        proxyenabled.checked=True  
        bthchangeproxy.Value="Disable Proxy"  
        window.status="Your IE session is configured to use a proxy server"  
    End If    
    End Sub  
    Sub chgproxy  
    Dim WshShell, bKey  
    Set WshShell = CreateObject("WScript.Shell")  
    regkey="HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsProxyEnable"  
    If proxyenabled.checked=True Then  
        WshShell.RegWrite regkey, 0, "REG_DWORD"  
        proxydisabled.focus  
        window.alert("IE will access the Internet directly.")  
        curproxy()         
    Else  
        WshShell.RegWrite regkey, 1, "REG_DWORD"  
        proxyenabled.focus  
        window.alert("IE will now use the defined Proxy server.")  
        curproxy()         
    End If  
    End Sub  
 </script>  
 <body STYLE="font:bold 22pt arial; color:white;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#000000', EndColorStr='#0000FF')" onload="curproxy()">  
     Proxy Switcher<br />  
     <br /><span style="font-size: 12pt; color: yellow; font-family: Tahoma">  
     <input id="proxyenabled" name="proxyenabled" style="width: 22px" title="IE Currently using Proxy Server"  
         type="radio" />IE is using Proxy Server<br />  
     <input id="proxydisabled" name="proxydisabled" style="width: 22px" title="IE Currently using Proxy Server"  
         type="radio" />IE is not using Proxy Server</span>&nbsp;<br />  
     <input id="bthchangeproxy" name="bthchangeproxy" type="button" value="Change Proxy" onclick="chgproxy()" />  
   
 </body>  
</html>

User avatar
casaestrada
Posts: 15
Last visit: Tue Jun 12, 2012 10:56 am

Proxy IE Exceptions

Post by casaestrada »

Under Internet exporer toolsconnections lan settings you can place Proxy server as well as exceptions to bypass proxy server.....

Group policy can do this but we are having group policy issues at moment
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Proxy IE Exceptions

Post by jvierra »

User settings:
ProxyOverride is a semicolon separated list.
"193.1.1;193.3.4;"

Code: Select all

	
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsProxyOverride="
This topic is 14 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked