I am making a Windows installer and I am using the following directory structure for the installation path:
<Directory Id="ProgramFilesFolder">
<Directory Id="Company" Name="CompanyName">
<Directory Id="INSTALLFOLDER" Name="ProductName" />
</Directory>
</Directory>
The above code snippet will install my app in the "Program Files (x86)" folder. My application only runs on a 64 bit version of Windows so I would like to install it in the Program Files folder instead. How can I do this?
It doesn't normally matter whether a program's files are stored in Program Files or Program Files (x86). Windows automatically installs programs to the correct folder, so you don't have to think about it. Programs appear in the Start menu and function normally, no matter where they're installed.
Go to Tools -> WiX Setup Editor. On the left under Root Directory choose InstallFolder. Under Projects to install, choose the project you want to install. In the red area to the right, you'll see a list of files.
Use ProgramFiles64Folder
instead of ProgramFilesFolder
.
Besides that, set:
Product/Package/@Platform="x64"
Product/Package/@InstallerVersion
to at least 200
Component/@Win64="yes"
For .NET assemblies:
File/@ProcessorArchitecture="x64"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With