Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installer question: "Program Files" or "Program Files (x86)"?

I am installing a .NET (C#) application that is 100% managed code. The installer (InnoSetup) always wants to install the application to the "Program Files (x86)" folder in Vista x64, which I'm assuming is because the installer itself is only 32bit. (please correct me if I am wrong) Here are my questions:

  1. Does being in the x86 folder affect my application at all in a behind-the-scenes way that I'm not aware of?
  2. I'm assuming that my application will still run as a true x64 application, despite being in the x86 folder - is this correct?
  3. Would there be any advantage in having the installer put the application in the "Program Files" folder?

Thanks!

like image 835
Jon Tackabury Avatar asked Jun 24 '09 17:06

Jon Tackabury


2 Answers

  1. Probably not. Being in that (x86) folder makes older applications tend to find it easier (if that's needed) because they reference it by the environment variable.

  2. Yes. As long as your EXE is marked as "Any CPU" it should be JIT compiled as 64 bit.

  3. It'd be clearer that it's 64 bit.

like image 87
Jeff Moser Avatar answered Oct 10 '22 03:10

Jeff Moser


Reference: Install Mode: 32-bit vs. 64-bit.

  1. Definitely not. You could put your program in C:\Users\All Users\Desktop, and your application would run just fine.

  2. As Jeff mentions, if you are compiling to "Any CPU" managed code, this code can be run on 32-bit or 64-bit Frameworks. Perhaps it is because the code can run on 32-bit that the installer chooses the 32-bit Program Files directory. I don't know InnoSetup much at all.

    Reference: advantages to compiling as 64 bit and considerations of 32 bit vs. 64 bit. Things to think about in choosing "all 64 bit". And also even when you do, asking the question "Are you sure?"...

  3. I would not recommend putting 32-bit programs in the 64-bit installation directory, but this is simply for convention. You should be able to configure a default installation path in the installer script.

like image 43
maxwellb Avatar answered Oct 10 '22 01:10

maxwellb