Small vbs to untick proxy in IE.

Discussion in 'Networks' started by hippy, Mar 3, 2009.

  1. hippy

    hippy Kilobyte Poster

    307
    5
    40
    Option Explicit

    Dim Server, sRegPath, Hippy, objShell

    Server = "SERVERNAME"
    sRegPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\" _
    & "Internet Settings\ProxyEnable"

    Set objShell = CreateObject("WScript.Shell")

    Evans = objShell.Run("ping -n 2 -w 1000 " & strPrnSRV,0 ,True)

    If Hippy = 0 Then
    objShell.RegWrite sRegPath, "1", "REG_DWORD"
    End If
    If Hippy <> 0 Then
    objShell.RegWrite sRegPath, "0", "REG_DWORD"
    end if

    Set objShell = Nothing
    Wscript.quit(0)
     
  2. dales

    dales Terabyte Poster

    2,005
    51
    142
    Oooh, check you out!
     
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  3. Kitkatninja
    Highly Decorated Member Award 500 Likes Award

    Kitkatninja aka me, myself & I Moderator

    11,140
    555
    383
    How about using WPAD? Web proxy auto discovery. Modey (Dom) set it up here at our place :)

    -Ken
     
    Certifications: MSc, PGDip, PGCert, BSc, HNC, LCGI, MBCS CITP, MCP, MCSA, MCSE, MCE, A+, N+, S+, Server+
    WIP: MSc Cyber Security
  4. hippy

    hippy Kilobyte Poster

    307
    5
    40
    This was a quick fix thing my manager requested...

    I heard of WPAD before but never looked into it and the information on google is a little sparse. I wonder if dom will respond with some WPAD details ^^.
     
  5. Modey

    Modey Terabyte Poster

    2,397
    99
    154
    Hi Hippy,

    WPAD (Web Proxy Auto Discovery) can be setup a few different ways. The main steps needed are as follows :-

    Setup a webserver IIS or Apache and host your wpad.dat file on there. The wpad.dat file contains a small script which identifies your proxy server (and you will obviously need some form of proxy server for the wpad info to point at). We were using ISA 2006 up until recently as our internal proxy. It was also webfiltering and caching. If you are going to use ISA for your proxy, then it can also act as your WPAD server (no need for a webserver) as this is a built in feature.

    We are now using a dedicated web filtering solution (Sophos WS1000) so we needed to update our WPAD setup so it points at this new proxy.

    So once you have your webserver / ISA server hosting your wpad.dat file, you then need to tell your clients where the WPAD info is located.

    The main way to do this is by adding a new DNS Cname record into your DNS server and also a new server option in DHCP. Have a look here :- http://technet.microsoft.com/en-us/library/cc713344.aspx

    Then scroll about halfway down to Configuring WPAD Entries. All the info you need is there.

    The default setting for IE is to auto detect any WPAD servers, then if they can't fall back onto a direct connection. If you want to make sure this setting is on, you can use group policy to force it on (incase users have unticked it).

    In a nutshell, that is it. Sounds complicated but it's not that bad really. One big advantage is you can centrally re-configure all proxy access when you change proxies etc... like in the example I mentioned above.
     
    Certifications: A+, N+, MCP, MCDST, MCSA 2K3, MCTS, MOS, MTA, MCT, MCITP:EDST7, MCSA W7, Citrix CCA, ITIL Foundation
    WIP: Nada

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.