在注册表中拒绝访问... [英] Access Denied in in registry...

查看:194
本文介绍了在注册表中拒绝访问...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,普通用户无法访问HKEY_CURRENT_USER\Software\Microsoft \ Windows \ CurrentVersion \POLicies \系统注册表节点。我需要管理员权限来修改它。



i需要来源C#.net

As far as i know HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System registry node is not accessible for normal user. i needs admin rights to modify it.

i need source C#.net

推荐答案

你想要的修改嵌入程序的清单。这适用于VS2008及更高版本:Project + Add New Item,选择Application Manifest File。更改< requestedexecutionlevel>元素:

You'll want to modify the manifest that gets embedded in the program. This works on VS2008 and higher: Project + Add New Item, select "Application Manifest File". Change the <requestedexecutionlevel> element to:
<requestedexecutionlevel level="requireAdministrator" uiaccess="false" />



用户启动程序时会收到UAC提示。明智地使用,他们的耐心会很快消失。



从以下文章获取更多信息

在应用程序启动时请求管理员批准 [ ^ ]


这篇关于在注册表中拒绝访问...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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