Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Program Files folder instead of Program Files (x86) installation path in wix

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?

like image 424
Amin Merati Avatar asked Apr 13 '17 08:04

Amin Merati


People also ask

Should I install in program files or x86?

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.

How do I create a WiX Windows Installer?

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.


1 Answers

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"

like image 62
dvorn Avatar answered Oct 17 '22 20:10

dvorn