Click here to Skip to main content
15,887,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to disable checkbox "Automatically detect settings" , Enable checkbox "use automatic configuration script" ?


[^]

What I have tried:

Below is my code for change the value fo auto configuration proxy.But i need to enable the checkbox of "use automatic configuration script" to use below script.

string Cname = "Try";
 RegistryKey myKey = Registry.LocalMachine.OpenSubKey(@"HKEY_CURENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", true);
                if (myKey != null)
                {
                    myKey.SetValue("AutoConfigUrl", Cname, RegistryValueKind.String);
                    myKey.Close();

                    Console.WriteLine("Changed Succesfully");
                    Console.ReadLine();

                }
Posted
Updated 16-Aug-17 22:28pm

1 solution

There is no registry key for that check box. The checkbox is enabled if the AutoConfigUrl value exists. When disabling the checkbox, the value is removed from the registry.

However, it seems that the control panel stores the value somewhere when unchecking the box. But don't ask me where.

You can check this by changing the settings in the control panel and reading the Internet Settings registry key afterwards (or by exporting the key; the generated reg files are plain text files).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900