关于在C#编程中从受限(普通)用户帐户读取/写入注册表 [英] Regarding Registry Read/Write from Limited(Normal) user account in C# programming

查看:198
本文介绍了关于在C#编程中从受限(普通)用户帐户读取/写入注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在开发Windows应用程序,其中必须读取/写入注册表.

当我从管理员帐户读/写时,其工作正常.
但是对于受限(普通)用户,则不允许.

谁能指导我如何使用c#以受限(普通)用户身份读取/写入注册表文件.

是真的 .因此,我们将不胜感激.

感谢

Hi All,

I am developing windows application in which i have to read/write the registry.

When i am reading/writing from admin account its working fine.
But for the limited(Normal) user its not allowing.

Can anyone guide me how can i read/write the registry file as a limited(Normal) user using c#.

It''s really . So any help would be appreciated.

Thanks

推荐答案

您的受限帐户受到限制.这意味着它没有对注册表的完全访问权限.这是一个勇敢的新世界,Vista和Weven不允许任何旧代码访问所有机器资源.也许如果您编辑帖子以告诉我们您要尝试读取哪些键以及想要写入哪些键,我们也许可以提供更具体的帮助,但是总的来说,如果您的应用抛出权限错误,则需要授予权限,在Vista上通常意味着要以admin身份运行它.
Your limited account is, well, limited. That means it does not have full access to the registry. It''s a brave new world, Vista and Weven do not let any old code access all of the machine resources. Perhaps if you edit your post to tell us what keys you''re trying to read and what ones you want to write, we might be able to offer more specific help, but in general, if your app throws a permissions error, you need to give it permission, and on Vista, that often means running it as admin.


尝试在 HKEY_CURRENT_USER 和您将不再需要管理员权限.
Try writing to the user specific keys under HKEY_CURRENT_USER and you''ll not need administrator rights anymore.


这篇关于关于在C#编程中从受限(普通)用户帐户读取/写入注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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