Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX installer that always installs to "Program Files" directory on both x86 and x64

Tags:

x86

64-bit

wix

I have a .NET application that runs on both x86 and x64. I'd like to have a 32 bit WiX installer that will work on both platforms but I'd like it to install to /Program Files/ rather than /Program Files (x86)/ on 64 bit operating systems.

How do you go about doing this?

Update:

My idea was to assign the ProgramFilesFolder or ProgramFiles64Folder value to my own property, depending on whether it was a 64 bit environment or not, and then use that property value on the directory.

I have very little experience with WiX so if this idea is even possible I have no idea. If it is what would you test on to see if it is an x64 environment? Also how would you then assign a property value from ProgramFilesFolder or ProgramFiles64Folder depending on the earlier 64 bit environment test.

Any help is appreciated!

like image 279
James Newton-King Avatar asked May 15 '10 04:05

James Newton-King


3 Answers

While it's true that MSI's support here is weak, you might want to read the following article and comments then decide for yourself how you want to proceed.

http://blog.deploymentengineering.com/2008/01/even-developers-are-concerned-about.html

like image 138
Christopher Painter Avatar answered Nov 02 '22 19:11

Christopher Painter


I just found this, I tried your exact idea and no dice. You can't actually access ProgramFiles64Folder unless you are running a 64-bit installer.

I've given up and am just installing my 64-bit component to ProgramFilesFolder. It's not that nice aesthetically but it works :)

like image 43
porges Avatar answered Nov 02 '22 19:11

porges


MSI doesn't support 32-bit packages installing to 64-bit directories.

like image 3
Bob Arnson Avatar answered Nov 02 '22 21:11

Bob Arnson