如何在win7上设置注册表项? [英] how to set the registry key on win7?

查看:87
本文介绍了如何在win7上设置注册表项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有
我试图在win7的C ++项目中操纵一些注册表项,这是我的问题:
当我尝试更改某个键的值时,遇到一个错误-错误编辑值".所以我不能在我的项目中更改它.
有人可以告诉我如何解决这个问题吗?关于优先权有什么问题吗?
您的任何回答将不胜感激.
PS:我已将清单级别更改为"requireAdministrator",但仍然无法使用.

all
I was trying to manipulate some registry keys in my C++ project on win7, and here is my problem:
when I tried to change some key''s value, I met a error - "error editing value". So I can''t change it in my project.
Can someone please tell me how can I solve this problem? Is there something about the previliges?
Any answers from you will be appreciated.
PS:I''ve changed the manifest level to "requireAdministrator", it still not work.

推荐答案

听起来像特权问题.

您可以使用regedit更改值吗?您可能必须以管理员身份运行regedit.

在Win 7上,即使您以管理员权限登录,似乎也必须右键单击并选择以管理员身份运行"才能实际获得管理员权限.我怀疑默认情况下,即使用户登录具有管理员权限,Win 7仍可能以较低的权限级别运行程序(从安全角度来看这很有意义.)

如果可以使用regedit更改值,则可能只需要确保您的程序实际上已以管理员权限运行.

您在调试器下运行吗?

您可能必须通过右键单击并选择以管理员身份运行来启动Visual Studio,以使您的程序在具有相同特权级别的调试器下运行.尝试一下.
Sounds like a problem with privileges.

Can you change the value using regedit? You probably have to run regedit as administrator.

On Win 7, even if you are logged in with admin privileges, it seems you have to right click and select "run as administrator" to actually get adminstrator privileges. I suspect by default Win 7 may run programs at a lower privilege level even if the user logon has admin privileges (which makes sense from a security viewpoint.)

If you can change the value using regedit, then you probably just need to make sure your program is actually running with admin privileges.

Are you running under the debugger?

You may have to start visual studio by right clicking and selecting run as administrator in order to get your program to run under the debugger with those same privilege levels. Try it.


选中此-> [ ^ ]

请检查我的答案SetAppAsDefault.
Check this->[^]

Please check my answer SetAppAsDefault.


这篇关于如何在win7上设置注册表项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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