I have an installer that writes to HKLM\Software\DroidExplorer\InstallPath
. On any x86 machine it writes just fine to the expected location, and on Windows XP x64 and Windows 7 x64 it also writes to the expected location, which is actually HKLM\Software\Wow6432Node\DroidExplorer\InstallPath
.
Later on during the install, my bootstrapper, which is also x86, attempts to read the value. On all x86 Windows machines it is successful, and on Windows XP x64 and Windows 7 x64, but Windows Vista x64 is unable to locate the key. If I look in the registry, it doesn't actually write it to Wow6432Node on Windows Vista; it writes it to Software\DroidExplorer\InstallPath
.
If I do not forcefully tell the installer to write to Wow6432Node, it writes the value to Software\DroidExplorer\InstallPath
, but the bootstrapper still tries to look in Wow6432Node because of the registry reflection. This is on all x64 systems.
Why is Windows Vista x64 the only one I have this issue with? Is there a way around this?
I just want to add an edit that this is still open. None of the suggestions below have yet to solve this issue.
The fact that registry redirection is failing on Windows Vista x64 is very strange because according to MSDN, Registry Redirector, Windows Vista should also be affected by it.
A comment in another answer, "This does not work, when I build the x64 version of the application, that installs in the x64 PFiles, it tells me that I am using a 64-bit install directory and doesn't allow the Win64=no" left me a bit confused as to what type of MSIs you are building.
Registry redirection is only going to affect 32-bit components in your MSI. If the target platform for the WiX project is x86, then the resulting MSI is a 32-bit MSI and all components will be affected by registry redirection.
On the other hand, if the target platform of the WiX project is x64, then the only components that will be affected by the registry redirection will be those that are explicitly marked as Win64=no. (By default, WiX assumes that all components are 64-bit if your target platform is x64.)
Note that if the component for your registry entry is included inside the ProgramFiles64 folder, then WiX will assume that it is a 64-bit component, and it will not be affected by registry redirection. This is the reason WiX is not allowing you to specify Win64=no on that component.
You should verify that every component that contains a registry entry that you do want to be redirected is configured to use ProgramFiles (the 32-bit one) as it's the parent directory in both your x86 and your x64 MSI files.
Probably you have to change the code of your 32-bit bootstrapper. You should test whether the application run under 64-bit operation system, for example with respect of IsWow64Process
function (see http://msdn.microsoft.com/en-us/library/ms684139.aspx). If the operation system is 64-bit then you should open key with KEY_QUERY_VALUE | KEY_WOW64_64KEY
flag (or other flags combined with KEY_WOW64_64KEY
) in RegOpenKeyEx
.
If you will receive close problems with file redirection under 64-bit operation systems you can call Wow64DisableWow64FsRedirection
in the bootstrapper (see http://msdn.microsoft.com/en-us/library/aa365743.aspx).
UPDATED based on the comment: If you want that Software\WOW6432Node\DroidExplorer\InstallPath
key will be created by MSI (for example it you install a 32-bit application) you can do this directly. Of cause you should Windows Installer are running on 64-bit operation systems with conditions in the component table using VersionNT64
property (or Msix64
or Intel64
if needed).
UPDATED 2 consider usage of msidbComponentAttributesDisableRegistryReflection
or /and msidbComponentAttributes64bit
flags for components with registry keys which you create. Moreover verify which values you use in Template Summary
(x64;1033
or Intel;1033
) and Page Count Summary
property (must be 200 or greater) in the summary information stream.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With