views:

289

answers:

1

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.

+1  A: 

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.

Shay Erlichmen
Though this is possible, I'd rather create a shared key.
Michael Stoll
@Michael What do you mean by "Shared Key" I don't know if such a thing exists
Shay Erlichmen
A shared key ist a key, wich is not redirected (see the MSDN Article, I've mentioned in the Question). But I couldn't find anything else about this, so I think yours is the solution.
Michael Stoll