How to create a shared registry key for WoW64 and x64 processes

Is there a way to create a custom (WoW64) shared registry key?

By default, some registry keys are split and others redirected (see MSDN ). But I want to create my own registry key under HKLM \ Software, which should be shared. I am looking for a solution in C # (possibly P / Invoke) and WIX.

+4
source share
1 answer

If you add the KEY_WOW64_32KEY flag to RegCreateKeyEx (or RegOpenKeyEx ), you will always access the 32-bit registry.

I could not find this flag (and KEY_WOW64_64KEY , which is the same, but for 64-bit access) in the Wix source code, so you may need to use pinvoke.

+1
source

Source: https://habr.com/ru/post/1303661/


All Articles