0
votes

I have a large project with WiX based installer. It is 32bit only. I can install it at 32 bit and 64 bit. The only problem, that at 64 bits several values are in registry in Wow6432Node (it is ok usually), but I need to replace some values in HKLM/SOFTWARE/Microsoft/Windows NT

I am doing it like this:

<Component Id="..." Guid="..."
      Transitive="yes" Win64="yes">
      <Registry Id="..."  
        Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\..."
        Name="..." Type="string" Value="..." />
</Component>

But it doesn't work with installing in 32bit systems. How can I do it without creating 2 versions (32bit and 64bit)?

1

1 Answers

0
votes

From 32-bit installer or application you simply cannot easily access the 64-bit registries. The system simply hides them by reflection as described in 32-bit and 64-bit Application Data in the Registry. However there is a technique how to solve this problem. This is described in How to access the “real” x64 registry from a Win32 .NET Application. Please check the section named How do I use this in Managed code? to get the idea. Then write a managed custom action that will do this for you. Personally I did not try this solution but it seems to me that it should work.