![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
C#操作注册表using Microsoft.Win32;
public void SetStartPage(string StartPage)
{
RegistryKey rk0 = Registry.CurrentUser;
RegistryKey rk1 = rk0.OpenSubKey("Software", true);
RegistryKey rk2 = rk1.OpenSubKey("Microsoft", true);
RegistryKey rk3 = rk2.OpenSubKey("Internet Explorer",true);
RegistryKey rk4 = rk3.OpenSubKey("Main",true);
rk4.SetValue("Start Page",StartPage);
rk4.Close();
}
这个示例是更改IE首页的 本人测试成功