private void IeRegidet()
{
string value32 = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", true).GetValue("(32)YdCallCenter.exe", "null", Microsoft.Win32.RegistryValueOptions.None).ToString();
string value64 = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", true).GetValue("(32)YdCallCenter.exe", "null", Microsoft.Win32.RegistryValueOptions.None).ToString();
log.WriteLog("frmLogin", "IeRegidet", "value32" + value32 + "value64" + value64);
if (!value32.Equals("8888") || !value64.Equals("8888"))
{
RegistryKey key32 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION");
key32.SetValue("(32)YdCallCenter.exe", 8888, Microsoft.Win32.RegistryValueKind.DWord);
key32.Close();
RegistryKey key64 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION");
key64.SetValue("(32)YdCallCenter.exe", 8888, Microsoft.Win32.RegistryValueKind.DWord);
key64.Close();
log.WriteLog("frmLogin", "IeRegidet", "DONE");
}
}
修改注册表,因为32位系统和64位系统所需要改的位置不同,所以一起改了!