September 25, 2013

Set your proxy using batch file, with a simple Double Click.

In this tutorial, you learn how to create a batch file that sets your proxy server easily.

Usually, you can do that by opening the Control Panel, then Internet Settings. In the Connections Tab, you click LAN Settings. Then you can change your proxy URL and Port (see picture below).


Now, we'll give you a simple way to make this very easy, especially if you change your proxy very often.


  • Steps to follow :

1 - Create a file (in notepad or any text editor).

2- Copy and paste the code below :


    @echo off
   
    REM put your proxy url here.
    set PROXY_URL=xx.xx.xx.xx
   
    REM define your proxy port.
    set PROXY_PORT=xxxx
   
    REM ***** You don’t need to change anything below this line! ******
   
    echo "Setting You Proxy Information"
   
    echo "------------------------------------------------"
    REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "%PROXY_URL%:%PROXY_PORT%" /t REG_SZ /f
    REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /d "00000001" /t REG_DWORD /f
   
    echo "------------------------------------------------"
    pause

3- Change the "xx.xx.xx.xx" with your proxy IP (e.g :10.10.250.1)  or URL ( www.your-proxy.com).

4- The proxy Port is a 4 (or 2 !) digits number. By  default, the port is 80 or 8080.

4 - Save your file with a ".bat" extension (for exemple: "set-proxy.bat").


  • Download :

You can also download the file directly from here :


- or from  Google Drive

Note : in order to execute the batch file :

  •  you should log in as an administrator (In XP)
  • or right click the file and "run as administrator" (in windows Vista / 7 / 8).

Powered by IT and Careez - Blog