I added a registry key, but I cannot find it programmatically

。_饼干妹妹 提交于 2019-11-29 14:16:36

If you are running a 32 bit process on a 64 bit version of Windows the 32 bit process (your test application) is not always able to see the keys you created using 64 bit regedit.

Try running your application as 64 bit or use regedit to open the key using the path HKLM\SOFTWARE\Wow6432Node\Foo\Bar.

You can read more about 32-bit and 64-bit application data in the registry on MSDN.

Might be a x64 issue? When reading from the registry in a x86 process you are redirected to the Software\Wow6432node.

Try to open it for read only Registry.LocalMachine.OpenSubKey("Software", false).GetSubKeyNames() probably you are getting only those you are able to write into.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!