C#注册表 [英] C# Registry

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

问题描述

你好朋友,



我是c#的新手。



我正在尝试制作一个程序,可以将我的软件相关信息存储在系统注册表中。

当我尝试编写用c#代码注册,它给出了权限错误;无法写注册表。



请给我一个解决方案。



我正在使用此代码Windows 7和VS 2010.



提前谢谢。

Hello friends,

I am new to c#.

I am trying to make a program that can store my software related information in the system registry.
When I am trying to write the registry with c# code, it gives permission error; unable to write the registry.

Please give me a solution.

I am using this code with windows 7 and VS 2010.

Thank you in advance.

推荐答案

注册表是受保护的空间所以您的应用程序需要以管理员权限运行。右键单击您的应用程序并选择以管理员身份运行。
The registry is protected space so your application needs to run with administrator privilege. Right click your app and select "Run as administrator".


您好,

打开注册表编辑器,单击开始键并选择运行。

然后键入regedit并单击确定。

当thr注册表打开时,右键单击HKLM并选择权限。

当窗口出现时如果看到管理员点击它,然后检查

允许下的框,完全控制。



然后应该做的诀窍
Hello,
Open the registry editor, click the start key and select run.
then type regedit and click ok.
When thr registry is open right click on the HKLM and choose permissions.
when the window comes up if you see Administrators click on it and then check
the box under allow, full control.

then that should do the trick


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

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