0

I am uninstalling an application which due to a bug sometimes enables the Windows Proxy setting in Windows 10. The PCs are distributed globally so I need to schedule a task to trigger after the uninstall (in case proxy gets enabled and network connection is lost) to check if the proxy is enabled then turn it off.

I have run the PowerShell code below to edit the registry while testing, and have found no other method to achieve this.

I have made sure all browsers are closed, I have refreshed services, and I have power cycled the machine.

Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyServer -Value ""
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyEnable -Value 0

I have confirmed that the registry setting reflects the changes above, but the GUI (through Settings or through Internet Explorer) still shows the proxy enabled and the network connection remains down unless I manually uncheck the box.

Where are these proxy settings actually stored, there must be some other place besides the registry value that everyone refers to. When I set a value for a fake proxy and port, these setting remain in the GUI whether enabled or disabled until changed, but the registry settings are never updated to those values. These settings MUST reside elsewhere. Anyone know where?

1
  • Have you tried clearing the ...\Internet Settings\AutoConfigURL? Commented Jun 10, 2019 at 18:51

2 Answers 2

1

I had the same issue, but I had to also remove two registries. Then the proxy settings were disabled for my script to run.

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v DefaultConnectionSettings /f
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, the delete is I was missing for me. Except I needed HKLM (local machine) instead of HKCU (current user).
0

I found the answer. When running PowerShell and Regedit as an elevated user, the Current User context changes to that elevated user. The registry key needs to be edited under HKEY_USERS and then find the SID for the user in question and modify the entry there.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.