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.
Locked
User avatar
casaestrada
Posts: 15
Joined: Sat Mar 21, 2009 5:41 am

Proxy IE Exceptions

Post by casaestrada » Fri Aug 28, 2009 1:26 am

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
Joined: Sat Mar 21, 2009 5:41 am

Proxy IE Exceptions

Post by casaestrada » Fri Aug 28, 2009 2:15 am

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

User avatar
jvierra
Posts: 12096
Joined: Tue May 22, 2007 9:57 am
Contact:

Proxy IE Exceptions

Post by jvierra » Fri Aug 28, 2009 2:33 am

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

Code: Select all

	
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsProxyOverride="

Locked