最近想写一个修改浏览器首页的程序,我的思路是修改注册表HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Main\StartPage的键值来修改IE首页,代码如下
public void WTRegedit()
{
RegistryKey hkml = Registry.LocalMachine;
RegistryKey SOFTWARE = hkml.OpenSubKey("SOFTWARE", true);
RegistryKey Microsoft = SOFTWARE.OpenSubKey("Microsoft", true);
RegistryKey InternetExplorer = Microsoft.OpenSubKey("Internet Explorer", true);
RegistryKey Main = InternetExplorer.OpenSubKey("MAIN", true);
Main.SetValue("Start Page", "www.dayenet.com");
}
可是还是没有...
求教!!!
public void WTRegedit()
{
RegistryKey hkml = Registry.LocalMachine;
RegistryKey SOFTWARE = hkml.OpenSubKey("SOFTWARE", true);
RegistryKey Microsoft = SOFTWARE.OpenSubKey("Microsoft", true);
RegistryKey InternetExplorer = Microsoft.OpenSubKey("Internet Explorer", true);
RegistryKey Main = InternetExplorer.OpenSubKey("MAIN", true);
Main.SetValue("Start Page", "www.dayenet.com");
}
可是还是没有...
求教!!!
解决方案 »
- 问一下使用EF时,配置文件中的数据库连接用户和密码如何加密?
- 关于C#中浮点数的转换,float 2 double
- SOCKET网络编程中传送多个文件的问题
- Graphics.ScaleTransform(Single, Single)
- tablelayoutpanel刷新闪烁问题...
- GridView如何使含指定数据的那一行不能被删除
- 怎么让一个函数响应多个按钮啊?
- 散分了,请大家参与,参与有分,十分有趣呀,up有分------------------->>>>>>>
- 如何解决修改项目文件夹名称后引用名跟随改变?
- 有关在线程中使用FileStream.Write时,线程被中断的疑问
- TextBox内容更改和同步写入
- Win XP SP3安装VS2010旗舰版失败
RegistryKey hkml = Registry.LocalMachine;不是一个键!!!
网页上设为首页 和收藏夹
<area shape="rect" coords="843, 10, 905, 33" href="#"
onclick="homePage.SetHomePage(document.location.href);" />
<area shape="rect" coords="907, 10, 971, 32" href="#"
onclick="Hotsales.AddFavorite(document.title);" />