cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Johannes_John
Level 7

.NET ProgramFilesFolder on 64-bit

Hello!

My target:
One MSI for my .NET application
for 64-bit and 32-bit
Installationfolder allways: c:\program files
--- not c:\program files(x86) on a 64-bit system!

Many thanks in advance!
Johannes
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

I don't fully understand your question. Realize that the ProgramFilesFolder property will always resolve to the 32bit program files directory. The ProgramFiles64Folder property will resolve to the 64bit directory but can only be used in an MSI package that has been marked as 64bit.

Also generally the Any CPU concept in .NET was a failure. Newer versions of .NET now default to x86 and it's generally best to to think of your application as 32bit ( especially if you are doing COM Interop or P/Invoke ). If you really need to be Any CPU then a lot of thought has to go into making sure you have all your right dependencies for 32bit and 64bit.

You might be interested in this:
http://blog.iswix.com/2011/01/comments-on-setting-installdir-during.html
0 Kudos
Johannes_John
Level 7

Thank you Christopher,

your first chapter hits the bull's eye.
Does the assessment with the failture come from MS?

Regards
Johannes
0 Kudos
Christopher_Pai
Level 16

Well, I'm sure MS wouldn't call it a "failure" but here's the rational that I recall reading from them:

http://blogs.msdn.com/b/rmbyers/archive/2009/06/09/anycpu-exes-are-usually-more-trouble-then-they-re-worth.aspx
0 Kudos