21

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?

Erik
  • 503
  • 1
  • 7
  • 26
Amin Merati
  • 2,221
  • 4
  • 22
  • 38

1 Answers1

35

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"

maxp
  • 24,209
  • 39
  • 123
  • 201
dvorn
  • 3,107
  • 1
  • 13
  • 12
  • 1
    Thanks for your reply, I got the first line. Could you please tell me how to set the following lines? you mean like this? – Amin Merati Apr 13 '17 at 09:27
  • @AminMerati Exactly! – dvorn Apr 13 '17 at 10:04
  • @maxp Thanks for beautifying! – dvorn Oct 20 '17 at 15:23
  • 4
    You can do this, but know that there's [an easier way](http://www.joyofsetup.com/2010/05/14/working-hard-or-hardly-working). Basically, pass the -arch parameter to candle.exe, or if you're using Votive, set the Platform dropdown in Visual Studio to x64. – Paul May 29 '19 at 04:06