Hi all, I am looking to write two scripts to enable and disable my proxy settings. When I'm at work I need to use a proxy server, when I'm at home I have to manually untick the "use a proxy server" option. I've wrote the script to enable using the proxy server and put in the correct settings :
set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", "proxyname:port"
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride", "<local>"
I can't however work out how to write the script to untick the box and remove all proxy settings, I've tried so many different things and nothing seems to work. Can anyone help me please cause im getting really frustrated now!
Cheers,
Andy
set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", "proxyname:port"
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride", "<local>"
I can't however work out how to write the script to untick the box and remove all proxy settings, I've tried so many different things and nothing seems to work. Can anyone help me please cause im getting really frustrated now!
Cheers,
Andy