在REGEDIT中更改LAN设置的注册表值 [英] Change value of registry of LAN setting in REGEDIT

查看:379
本文介绍了在REGEDIT中更改LAN设置的注册表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何禁用复选框自动检测设置,启用复选框使用自动配置脚本?





[ ^ ]



我的尝试:



下面是我的代码,用于更改自动配置代理的值。但我需要启用使用自动配置脚本复选框以使用下面的脚本。



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();

                }

推荐答案

该复选框没有注册表项。如果 AutoConfigUrl 值存在,则启用该复选框。禁用该复选框时,该值将从注册表中删除。



但是,当取消选中该框时,控制面板似乎存储了某个值。但是不要问我在哪里。



您可以通过更改控制面板中的设置并阅读 Internet设置注册表项来检查之后(或通过导出密钥;生成的reg文件是纯文本文件)。
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).


这篇关于在REGEDIT中更改LAN设置的注册表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆