Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Trouble writing 64 bit registry from 32 bit Setup


1 reply to this topic

vgimple

vgimple
  • Full Members
  • 9 posts

Posted 04 May 2011 - 16:37

Hi everyone!

I have a small issue that I guessed would not be *that* uncommon, but I could not find a useful answer on this one, so I am hoping someone here might have experienced that.

I have an installer that installs a 32 bit product (hence the Template Summary is set to "Intel"). That product is capable of running inside the "Windows on Windows 64" layer, so the installer is intended to run on a 64 bit OS as well. My installer runs well on both, but there is one nagging issue on the 64 bit OS:

As it happens, the installer needs to write registry keys and values in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers. When installing on a 32 bit OS, these keys and values end up where they're supposed to be and the Explorer picks up on the entered property handlers.
However, when running the installer on a 64 bit OS, the keys and values are entered in HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers, which is not helpful at all (on the 64 bit OS explorer.exe is a 64 bit process and as such it could not care less about the contents of the Wow6432Node hierarchy...).

So what I need to find is "the correct way" to write registry keys and values in HKLM\SOFTWARE\ from a 32 bit installer in such a way that the keys do not end up in the HKLM\SOFTWARE\Wow6432Node section on a 64 bit OS. But apparently as long as the component writing the registry keys is not marked as a 64 bit component registry virtualization strikes and the keys and values are redirected into the 32 bit view of the registry. Marking the component as a 64 bit component is not an option however, because this raises an error as long as the Template Summary is "Intel". The "Disable Registry Reflection" flag is not set either, which is why I am even more surprised I have this problem in the first place.

Does anyone know a better way to achieve what I need than writing a CA that takes care about this???

Thanks in advance for any comments.
Best regards

Volker

Edited by vgimple, 04 May 2011 - 16:37.


deramor

deramor
  • Full Members
  • 187 posts

Posted 18 May 2011 - 18:25

For what reason are you writing to that registry location?

Also, In my experience, the behavior you are seeing is correct. A 32-bit process will read and write information from the Wow node in the registry. Windows 64-bit was written this way to allow seamless 32-bit execution.

There may be a better way to do what you are trying to accomplish however you may need to create a CA and 2 different features. One with a normal feature with this registry key in it for 32-bit installs. Another feature with a component that is marked as 64-bit for a 64-bit install. Finally a CA that enables one and disables the other depending on the system. You can use Installscript for this, even in a Basic MSI project. FeatureSelectItem should work. Just make sure you explicitly select and deselect both features where needed.