Labels

Suggested Reading

Suggested Reading
Ayurvedic Way of Living - A step towards a Disease free life

Search This Blog

Comments

4-comments

Feed

POPULAR POSTS

Delete temporary files using command prompt

How to execute MASM programs in Windows 7

Skip to main content
"Short, tweetable sentence from the article." Tweet this

Enable/disable proxy using a batch file in Windows

Enable or Disable Proxy Using a Batch File in Windows

Sometimes, you might need to quickly turn your system proxy ON or OFF, for example, when switching between a corporate network, VPN, or your home connection.
Instead of navigating through Internet Options each time, you can do it instantly using a batch file.

Open notepad and add the following text



reg add "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
" /v ProxyEnable /t REG_DWORD /d "0" /f
then save the file with the .bat as the extension,like proxy.bat
then you're done,

Now just double click the batch file,the proxy will be disabled.

In the code, 0 is used to disable the proxy and you can use 1 to enable the proxy again.

You can create two shortcuts on your desktop:

  • “Enable Proxy”

  • “Disable Proxy”

This makes it super easy to switch between proxy modes with just one click.

If the changes don’t apply immediately, try restarting your browser or disconnecting/reconnecting to the internet.

PS: Before running the batch file, it is always safe to take the backup of the registry.


Comments

  1. no its not working...damn......i need it hlp me out plz

    ReplyDelete
  2. REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d "1" /f

    ReplyDelete

Post a Comment

Type in your comments here,we welcome your suggestions,complaints and feedback