WiX: How to override “C:\Program Files (x86)” on x64 machine in WixUI_Advanced sequence?

前端 未结 3 1523
独厮守ぢ
独厮守ぢ 2021-02-04 07:05

I\'m using WixUI_Advanced sequence to allow users pick per-machine or per-user installation and change destination folder. My WiX project is i

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 07:53

    I had to change two things to make WIX put my 64-bit app in the Program Files folder:

    A. In the WIX Package element, add 'Platform="x64"':

    ‹Package Description="desc..." Manufacturer="company..." InstallerVersion="200" Platform="x64" Compressed="yes" /›

    B. In the Directory element for the top folder, change ProgramFilesFolder to ProgramFiles64Folder:

    ‹Directory Id="ProgramFiles64Folder" Name="PFiles"›

    (I also had to include the ‹program name› .exe.config file in the folder for the program to work correctly)

提交回复
热议问题