我如何从注册管理机构HKCU有效地编写和阅读 [英] How do I EFFECTIVLY write and Read from registry HKCU

查看:64
本文介绍了我如何从注册管理机构HKCU有效地编写和阅读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我的程序将表单位置值保存到注册表中的HKCU。这适用于管理员帐户,但间歇性地使用受限帐户。我以前认为有限帐户可以在没有任何特殊权限的情况下进行读写。这是我的代码:(抱歉,我不知道如何正确附上代码)



写:



My.Computer.Registry.CurrentUser.CreateSubKey(Test)

My.Computer.Registry.SetValue(HKEY_CURRENT_USER\Test,x,me.left)

My.Computer.Registry.SetValue(HKEY_CURRENT_USER \ Test,y,me.top)





阅读:



dim xleft,yleft as string



xleft = My.Computer .Registry.GetValue(HKEY_CURRENT_USER \ Test,x,没有)

yleft = My.Computer.Registry.GetValue(HKEY_CURRENT_USER \ Test,y,没有)

Hi. My program saves Form location values to HKCU in the registry. That works fine with an admin account, but works intermittently with a Limited account. I used to believe that a Limited account can read and write without any special permissions. Here is my code: (Sorry i don't know how to properly attach the code)

to write:

My.Computer.Registry.CurrentUser.CreateSubKey("Test")
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Test","x",me.left)
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Test","y",me.top)


to read:

dim xleft,yleft as string

xleft = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Test", "x", nothing)
yleft = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Test", "y", nothing)

推荐答案

有限的帐户需要注册表的权限才能读取和写入。

如果您没有权限,则无法使用可以绕过这些权限并读取注册表。
A limited account will need permissions to registry to read and to write.
If you do not have permissions, there is no way you can bypass these permissions and read the registry.


这篇关于我如何从注册管理机构HKCU有效地编写和阅读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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