post icon

How to Enable and Disable proxy by script DOS command

Il seguente snippet spiega come abilitare e disabilitare il proxy di Internet Explorer mediante riga di comando.
E’ sufficiente creare i seguenti file di registro (enableProxy.reg): 

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyEnable"=dword:00000001 "ProxyServer"="indirizzo_proxy:porta_proxy"

 e (disableProxy.reg): 

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyEnable"=dword:00000000

 Infine bisogna create i file .bat che abilitano e disabilitano il proxy:

enableProxy.bat 

@echo off regedit /s "C:\EnableDisableProxy\enableProxy.reg" start iexplore.exe

 e disableProxy.bat 

@echo off regedit /s "C:\EnableDisableProxy\disableProxy.reg" start iexplore.exe

Download snippet completo: EnableDisableProxy.zip (1,13 kb)

Enjoy snippet!

17 luglio 2009 @ 10:31

No comments yet.

Leave a comment

Leave a Reply

Are you human? Time limit is exhausted. Please reload CAPTCHA.