我想以编程方式启用/禁用Internet Explorer的代理 - C# 有人可以帮我这方面吗?
提前致谢, Ravi Naik。
答案 0 :(得分:5)
RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
//disable proxy
registry.SetValue("ProxyServer", 1);
//remove tik
registry.SetValue("ProxyEnable", 0);
//Proxy Status
int proxyStatus = (int)registry.GetValue("ProxyEnable");
if (proxyStatus == 0)
lblProxyStatus.Text = "disable ";
if (proxyStatus == 1)
lblProxyStatus.Text = " enable";