c#操作注册表,设置可信站点和Active启用,代码如下:
/// <summary>
/// 添加可信站点和active为启用
/// </summary>
/// <param name="TrustedSite">可信站点</param>
public static void SetTrustedSite(string TrustedSite)
{
try
{
//判断是否存在
bool SiteHas = false;
List<string> numbers = new List<string>();//用来存放Range编号
RegistryKey key = Registry.CurrentUser.OpenSubKey("SoftWare", true);
RegistryKey micr = key.OpenSubKey("Microsoft", true);
RegistryKey win = micr.OpenSubKey("windows", true);
RegistryKey cur = win.OpenSubKey("CurrentVersion", true);
RegistryKey inter = cur.OpenSubKey("Internet Settings", true);
RegistryKey zone = int