tags:

views:

708

answers:

3

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!

+4  A: 
  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.

Jeff Moser
Excellent, thanks. I didn't think there was a difference, but I wasn't able to find any docs in MSDN about this. I don't have a need for other applications to find it, and since it's working I also don't have a need to break it by trying to move it. :) I'll just leave it as-is for now. Thanks!
Jon Tackabury
+3  A: 

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.

maxwellb
A: 

The only problem i could think if you hardcoded any values for manipulating files in that folder. But im sure you didnt :)