如何读取在 StdUser 级别下创建的 HKEY_LOCAL_MACHINE\Software\MyApp 项?
我有一个 C++ Win32 DLL,由在 Windows7 中的 requireAdministrator 的 requestExecutionLevel 中运行的应用程序调用。
如何读取在 StdUser 级别下创建的 HKEY_LOCAL_MACHINE\Software\MyApp 项?
此密钥是在 HKEY_USERS\_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node 中自动创建的,
我发现 这篇关于它的文章,但它仅涉及通过代码注入运行进程。
谢谢!
I have a C++ Win32 DLL, called by a application that is running in requestedExecutionLevel of requireAdministrator in Windows7.
How can I read a HKEY_LOCAL_MACHINE\Software\MyApp key that have been created under a StdUser Level?
This key was automatically created in the HKEY_USERS\_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node
I´ve found this article about it but it refers only about running a process with code injection.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你不能。
您说 StdUser 应用程序尝试将设置写入
HKLM\Software\MyApp
并最终将其写入虚拟化位置HKEY_USERS\ _Classes\VirtualStore。 ..`
。要阅读它,您必须知道 UserSID;如果有多个用户,每个用户可能会在该密钥中写入不同的数据。对于清单中具有
requestedExecutionLevel
的进程,虚拟化已关闭。有关如何修改虚拟化行为的信息,请参阅控制注册表虚拟化部分。You can't.
You say StdUser application tried to write a setting into
HKLM\Software\MyApp
and ended up writing it to virtualized locationHKEY_USERS\<UserSID>_Classes\VirtualStore...`
. To read it you have to know the UserSID; if there are several users, each user may have different data written in that key.Virtualization is turned off for processes which have
requestedExecutionLevel
in their manifest. See Controlling Registry Virtualization section on how you can modify virtualization behavior.如果您使用的是 64 位操作系统,您可以尝试设置权限
TRegistry *reg=new TRegistry(KEY_WOW64_64KEY)
。如果您有 32 位操作系统,reg->OpenKey("Software")
并且您自动重定向到您的密钥,那么您可以使用此密钥进行操作。You can try to set privilege
TRegistry *reg=new TRegistry(KEY_WOW64_64KEY)
, if you have 64bit OS. If you have 32 bit OS,reg->OpenKey("Software")
and you automatically redirected to your key, then you could to do operations with this key.