[wix-users] Is there any way around WIN64DUALFOLDERS substitution?
henderso at opentext.com
Tue Nov 7 07:33:32 PST 2017
I've got a problem. My install requires a Java 7 minimum install to run, and therefore is searching for an acceptable Java version (and jvm.dll) on the customer's system. This is a 32-bit install, but can use either a 32-bit or 64-bit Java instance. The problem I'm having is that if there's no 32-bit Java, but a perfectly acceptable 64-bit Java that happens to be installed in the "Program Files" tree, my Directory/FileSearch elements are being trashed by the WIN64DUALFOLDERS substitution.
My code is:
<Property Id="JRE_64_VERSION" Secure="yes">
<RegistrySearch Id="jre_64_ver" Root="HKLM"
Key="Software\JavaSoft\Java Runtime Environment"
Name="CurrentVersion" Type="raw" Win64="yes" />
<Property Id="JRE_64_JVM" Secure="yes">
<RegistrySearch Id="jre_64_dir" Root="HKLM"
Key="Software\JavaSoft\Java Runtime Environment\[JRE_64_VERSION]"
Name="JavaHome" Type="directory" Win64="yes">
<DirectorySearch Id="jre_64_jvm" Path="bin" Depth="1">
<FileSearch Name="jvm.dll" />
The JRE_64_VERSION search gives me the Java version, then the JRE_64_JVM searches try to find jvm.dll. The JRE_64_JVM registry search returns the proper directory, but then produces the message:
MSI (c) (C4:F0) [09:15:13:786]: WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\Java\jre7' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).
which causes the enclosed Directory/FileSearch to fail.
Is there any way to somehow set the above mentioned "mask" argument to 1 for a particular set of searches? I know why Windows Installer is trying to enforce this rule, but I'm not trying to install 32-bit code in the "Program Files" tree, I'm just trying to find something that's already installed there. If anyone has a solution for this (other than "install a 32-bit Java" or "install Java outside the 'Program Files' tree", I'd greatly appreciate it.
More information about the wix-users