wixwindows-installerwindows-7-x64wix3.5

WiX ProgramFiles64Folder behaves like ProgramFilesFolder (x86)


I building a simple installer that copies files to a folder under Program Files. In spite of defining the Component as Win64 and Directory to be ProgramFiles64Folder, the MSI at runtime changes the install path . I ran it using verbose log mode and I get the following message

 WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).

Below is my snippet (use registry to populate INSTALLDIR)

<Property Id="INSTALLDIR">
   <RegistrySearch
    Id="AsteaRegistryKeys"
    Type="raw"
    Root="HKLM"
    Key="Software\MyCompany\1.0\MyApplication"
    Name="InstallDir" />
</Property>
<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFiles64Folder">
    <Directory Id="MyCompany">
           <Directory Id="INSTALLDIR">
        <Component 
                     Id="MainExecutable" 
                     Guid="1537B67F-6D49-4bbc-89DC-20A1FB7E07E0" Win64="yes">
        <File 
             Id="EXE" 
             Name="MyApp.exe" 
             DiskId="1" 
             Source="Source_Bin\MyApp.exe" 
             KeyPath="no" />
           </Directory>
         </Directory>
    </Directory>
</Directory>

Solution

  • This is a problem between chair and keyboard. I defined the package platform incorrectly as "ia64" instead of "x64". Problem solved!