Get Adobe Flash player

    postheadericon What happened to proxycfg in Vista

    If you're used to getting and setting your proxysettings with the proxycfg command, you'll find yourself at a loss in Vista.
    Here's an overview of the new set of commands and some common uses:

    In an ms-dos prompt enter:

    netsh winhttp ?

     

    The following commands are available:

    … (Skipping the inherited commands …)

    Commands in this context:

    ?              - Displays a list of commands.

    dump           - Displays a configuration script.

    help           - Displays a list of commands.

    import         - Imports proxy setting from IE.

    reset          - Resets WinHTTP proxy setting to DIRECT.

    set            - Configures WinHTTP proxy setting.

    show           - Displays current WinHTTP proxy setting.

     

    You can use “show” to view the current settings, “set” to set the proxy settings and “import” to import current user’s Internet Explorer proxy settings. If you’ve used proxycfg.exe you will find that this context provides the same functionality. The only exception is “dump”, which creates a Netsh script with the current settings and can be executed later (on the same machine or different one) to set those settings.

    Let’s start by displaying the current proxy settings:

    netsh winhttp show proxy

     

    Current WinHTTP proxy settings:

         

        Direct access (no proxy server).

     

    Now let’s set the proxy server for HTTP sites to “myproxy” (port 80 by default), proxy server for HTTPS sites to “sproxy” (port 88) and set the bypass list to “*.foo.com”:

    netsh winhttp set proxy-server="http=myproxy;https=sproxy:88" bypass-list= "*.foo.com"

       

    Current WinHTTP proxy settings:

       

    Proxy Server(s) : http=myproxy;https=sproxy:88

    Bypass List : *.foo.com

     

    To reset the proxy settings to “direct” (not to use proxy servers), just type “reset”:

    netsh winhttp reset proxy

       

    Current WinHTTP proxy settings:

       

    Direct access (no proxy server).

     

    Another useful command is to import the proxy settings for the current user in Internet Explorer (note that different users may specify different proxy settings in IE):

    netsh winhttp import proxy ie

     

    Current WinHTTP proxy settings:

       

    Proxy Server(s) : ieproxy:80

    Bypass List : <local>

     

    Again, if you need to get a help on a command, just type it with question mark after it.


    Last Updated (Sunday, 05 July 2009 18:55)

     
    Comments (6)
    Errors above - Please check
    1 Saturday, 13 December 2008 16:16
    Hi Dimitri,
    I guess the command is "netsh winhttp show proxy" rather than "netsh winhttp proxy show". For resetting it should be "netsh winhttp reset proxy" rather than "netsh winhttp proxy reset".
    Please check this out.
    Thanks
    Anjana Kaku Tyagi
    2 Friday, 20 February 2009 10:13
    The corrections have been made.
    More corrections
    3 Friday, 26 June 2009 04:30
    you forgot the first one:

    netsh winhttp proxy ?

    should be:

    netsh winhttp ?

    Otherwise, thanks, just saved my bacon :)
    Later'ish
    Craig
    More corrections
    4 Sunday, 05 July 2009 18:57
    Dimitri
    You're right. Thanks for your keen eye, traveler. :-)
    correcton
    5 Friday, 05 March 2010 20:03
    netsh winhttp set proxy-server="http=myproxy;https=sproxy:88" bypass-list= "*.foo.com"

    Should be :
    netsh winhttp set proxy proxy-server="http=myproxy;https=sproxy:88" bypass-list= "*.foo.com"
    test
    6 Tuesday, 17 April 2012 22:54
    i'm back

    Add your comment

    Your name:
    Your email:
    Your website:
    Subject:
    Comment: