How to Enable or Disable Proxy using a Batch File
Create a Batch File like Proxy.Batreg add "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
" /v ProxyEnable /t REG_DWORD /d "0" /f
0=disable the proxy
1=enable the proxy
Command to enable proxy usage:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^
/v ProxyEnable /t REG_DWORD /d 1 /f
Command to disable proxy usage:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^
/v ProxyEnable /t REG_DWORD /d 0 /f
Command to change the proxy address:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^
/v ProxyServer /t REG_SZ /d proxyserveraddress:proxyport /f
Vista/7/2008
netsh winhttp set proxy {proxyservername}:{portnumber}
Removing a configured proxy can be done by using the following commands depending on your target operating system:
XP/2003
proxycfg -d
Vista/7/2008
netsh winhttp reset proxy
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.