New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WixUI_Advanced: x64 package installed to "C:\Program Files(x86)" #5908

Open
alexhass opened this Issue Nov 18, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@alexhass
Copy link

alexhass commented Nov 18, 2018

Triage

WixUI_Advanced hardcodes all applications to x86 program files folder. No way to change this to x64.

<CustomAction Id="WixSetDefaultPerMachineFolder" Property="WixPerMachineFolder" Value="[ProgramFilesFolder][ApplicationFolderName]" Execute="immediate" />

Bugs

If this issue is a bug:

  • Which version of WiX are you building with?

3.11.1

  • Which version of Visual Studio are you building with (if any)?

None

  • Which version of the WiX Toolset Visual Studio Extension are you building with (if any)?

None

  • Which version of .NET are you building with?

None

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?

Windows 10 R1809

  • Describe the problem and the steps to reproduce it.
  1. Build MSI with WixUI_Advanced.
  <?if $(env.Platform)=x86?>
    <?define ProgramFilesFolder="ProgramFilesFolder" ?>
    <?define Win64="no" ?>
    <?define Arch="(x86)" ?>
  <?else?>
    <?define ProgramFilesFolder="ProgramFiles64Folder" ?>
    <?define Win64="yes" ?>
    <?define Arch="(x64)" ?>
  <?endif?>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.ProgramFilesFolder)">
...
  • Describe the behavior you expected and how it differed from the actual behavior.

Setup defaults to C:\Program Files (x86), but should default to C:\Program Files

@alexhass

This comment has been minimized.

Copy link

alexhass commented Nov 18, 2018

Hack around this bug:

<?if $(env.Platform)=x86?>
  <?define ProgramFilesFolder="ProgramFilesFolder" ?>
  <?define Win64="no" ?>
  <?define Arch="(x86)" ?>
<?else?>
  <?define ProgramFilesFolder="ProgramFiles64Folder" ?>
  <?define Win64="yes" ?>
  <?define Arch="(x64)" ?>
<?endif?>

<!-- WixUI_Advanced defaults to "[ProgramFilesFolder][ApplicationFolderName]" what is wrong for x64 applications. Fix the path with an override. https://github.com/wixtoolset/issues/issues/5908 -->
<CustomAction Id="WixSetDefaultPerMachineFolderPerArch" Property="WixPerMachineFolder" Value="[$(var.ProgramFilesFolder)][ApplicationFolderName]" Execute="immediate"/>

<InstallExecuteSequence>
  <Custom Action="WixSetDefaultPerMachineFolderPerArch" Before="WixSetPerMachineFolder" />
</InstallExecuteSequence>
<InstallUISequence>
  <Custom Action="WixSetDefaultPerMachineFolderPerArch" Before="WixSetPerMachineFolder" />
</InstallUISequence>

@barnson barnson added this to the v4.x milestone Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment