Open alexhass opened 5 years ago
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>
This is still an issue in WixToolset.UI.wixext v5.0.1 (installed in Visual Studio 2022 with NuGet).
The above work-around addressed the problem in my case (dropping into my <?if $(env.Platform)=x86?>
To
<?if $(var.Platform)=x86?>
Apparently because I'm using WiX v5.
Triage
WixUI_Advanced hardcodes all applications to x86 program files folder. No way to change this to x64.
`
`
Bugs
If this issue is a bug:
3.11.1
None
None
None
Windows 10 R1809
Setup defaults to
C:\Program Files (x86)
, but should default toC:\Program Files