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首页的 本人测试成功
C#操作注册表
C#操作注册表
作者:达奇
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。