Question

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

By default some registry keys are shared and others are redirected (see MSDN). But I want to create a custom registry key under HKLM\Software which should be shared. I'm looking for a solution in C# (maybe P/Invoke) and WIX.

Was it helpful?

Solution

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

I couldn't find this flag (nor KEY_WOW64_64KEY which is the same but for 64bit access) in the Wix source code, so you might need to use pinvoke.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top