0

The following line of script from a Batch file works fine in Win 7 and successfully disables the proxy setting in IE, but when i have tried it on Win 10 it dosnt work the proxy setting in unaffected, any ideas why?

UAC is auto elevated as per UAC so admin privileges is not an issue.

i have checked with regedit and the HKCU directory seems to be the same path on both.

echo LAN Settings - Proxy Setting *Disable*

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^ /v ProxyEnable /t REG_DWORD /d 0 /f

IE > Internet Options > Connections > LAN Settings

enter image description here

M.Tomlinson
  • 81
  • 1
  • 9
  • Does not work is a horrible explanation to a problem. what does not work? do you see a success message, error or what happens? Please clarify? Also, I think that you should perhaps try run your script with some admin privileges and see if that makes a difference. – Gerhard Sep 03 '18 at 14:01
  • Adding something which already exists is the most general error case. Is this such a case? :-) – Dominique Sep 03 '18 at 14:11
  • The Proxy setting does not disable, there's no error it just does nothing. In Win 7 the IE Proxy setting check box is un-ticked when this is run. UAC auto elevated with code however it also dosnt work when run with admin privileges – M.Tomlinson Sep 03 '18 at 14:11
  • to clarify further the setting this is toggling is IE > Internet Options > Connections > LAN Settings – M.Tomlinson Sep 03 '18 at 14:13
  • @Dominique no this isnt the case: Win 10 - to test i manually enable proxy in IE settings then run the script, check IE Settings proxy is not disabled Win 7 - to test i manually enable proxy in IE settings then run the script, check IE Settings proxy is disabled – M.Tomlinson Sep 03 '18 at 14:19
  • 2
    Did you close the `Internet Options` dialog and then reopen it before veryfying whether the check mark had been removed? My verification process in both `Windows 7` and `Windows 10` showed that doing so correctly reflected the state, _leaving the Internet Options dialog open before choosing LAN Settings showed no change_. Also as a side note, the setting is for `HKEY_CURRENT_USER` so there's no reason at all to be elevating the command, _you should only need to implement that for `HKEY_LOCAL_MACHINE` settings_. Finally, please remove the unnecessary caret, **`^`**, there's nothing to escape. – Compo Sep 03 '18 at 17:23

0 Answers0