#include local $PAC = "http://10.0.84.24/proxy.pac" local $regKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" local $regError = "" local $errorTitle = "" Local $msgTimeout = 3 If @OSArch <> "X86" Then $regKey = "HKEY_CURRENT_USER64\Software\Microsoft\Windows\CurrentVersion\Internet Settings" RegWrite($regKey, "ProxyServer", "REG_SZ", "") RegWrite($regKey, "ProxyEnable","REG_DWORD", "0") RegWrite($regKey, "AutoConfigURL", "REG_SZ", $PAC) Switch @error Case 1 $regError = "Unable to open requested key" $errorTitle = "Error" Case 2 $regError = "Unable to open requested main key" $errorTitle = "Error" Case 3 $regError = "Unable to remote connect to the registry" $errorTitle = "Error" Case -1 $regError = "Unable to open requested value" $errorTitle = "Error" Case -2 $regError = "Value type not supported" $errorTitle = "Error" Case 0 $regError = "Fixed! Enter a new URL into the browser" $errorTitle = "Success" Case Else $regError = "Unexpected Error" $errorTitle = "Error" EndSwitch DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0) MsgBox($MB_SYSTEMMODAL, $errorTitle, $regError, $msgTimeout)