编辑注册表项时出现问题在Vista中通过BHO [英] Problem while editing the registry key In Vista through the BHO

查看:135
本文介绍了编辑注册表项时出现问题在Vista中通过BHO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在为c#VS2005中的IE开发一个工具栏。工具栏在HKEY_CURRENT_USER下创建一个新的注册表项,并编辑该键的值。它在XP中工作正常,但在vista中我只能在第一次安装工具栏并打开IE窗口时编辑密钥(安装UAC时启用了它,它促使我对安装进行了详细说明)。如果我退出IE并再次启动,我将无法编辑注册表项。我收到以下错误:

应用程序尝试执行安全策略不允许的操作。授予此应用程序所需的权限,联系您的系统管理员或使用MIcrosoft .NET Framework配置工具......

不允许请求注册表访问。
详细信息是,


**************异常文本**************
System.Security.SecurityException:不允许请求的注册表访问。
在System.ThrowHelper.ThrowSecurityException(例如ceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name,Boolean writable)

**************已装载的装配**************
...... .........................................
............................... ................
...... .........................................
............................... ................
...... .........................................
< br>
任何帮助都会有很大的帮助。

谢谢,
techy

Hi all,
 
    I am developing a toolbar for IE in c# VS2005. The toolbar creates a new registry key under HKEY_CURRENT_USER and edits the value of the key. It works fine in XP but in vista I am able to edit the key only when I first time install the toolbar and open an IE window(While installing UAC was on and it prompted me to aouthorize the installation). If I exit IE and start again I am not able to edit the registry key. I am getting the following error:

Application attempted to perform an operation not allowed by the security policy..To grant this application the required permission, contact your system adminstrator or use the MIcrosoft .NET Framework Configuration tool......

Requested registry access is not allowed.
and the detail is,


************** Exception Text **************
System.Security.SecurityException: Requested registry access is not allowed.
   at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
   at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)

************** Loaded Assemblies **************
...............................................
...............................................
...............................................
...............................................
...............................................


Any help would be greatly appeciated.

Thank you,
techy

推荐答案

你能来吗?发布你的代码(包括你要写的密钥)?
Can you post your code (including the key you're trying to write to)?


这篇关于编辑注册表项时出现问题在Vista中通过BHO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆