Installing to either Program Files or Program Files (x86)?

Got a problem you cannot solve? Try here.
kendallb
Posts: 14
Joined: Thu Jul 08, 2010 7:51 pm
Location: Chico, CA
Contact:

Installing to either Program Files or Program Files (x86)?

Postby kendallb » Thu Jul 08, 2010 7:59 pm

Hi Guys,

I am new to InstallAware and just purchased our license a few days ago. So far I am really liking the product, but I have run into something I cannot work out how to solve. Basically I am using InstallAware to install some .Net code onto client machines, and the code is entirely CPU agnostic. So on 64-bit machines, it runs in 64-bit mode and on 32-bit machines it runs in 32-bit mode.

Now the problem is the installer has to be a 32-bit installer in order for the program to be installable on 32-bit machines, so I cannot use a 64-bit native installer. As such, the default install location on 64-bit machines is always under "C:\Program Files (x86)\My Program", which works just fine but is a bit odd when the installed program is actually 64-bit native when run on a 64-bit machine as the code is processor neutral. I can see where the default value is set up in the installer code, but there does not appear to be a way to get the 64-bit version of this since the installer is actually 32-bit.

So, is there a solution to this? Everything works just fine, but it just feels odd to be running something that is really 64-bit, from the "C:\Program Files (x86)" directory :).
- Kendall Bennett

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Installing to either Program Files or Program Files (x86

Postby MichaelNesmith » Thu Jul 08, 2010 8:24 pm

Excellent question. This is pretty easy to do, actually. You use the Set 64 Bit Mode command to toggle InstallAware in and out of 64 bit installation mode. Of course, before changing the bit mode, you may want to call the Get System Settings command to see if it makes sense to do so. And the Get Folder Location command which actually populates your $PROGRAMFILES$ variable (also used in initializing $TARGETDIR$), when called in the correct mode, will return the correct folder. As long as Apply Install is called in the correct mode too, everything will end up in its proper, pleasing place :)
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

kendallb
Posts: 14
Joined: Thu Jul 08, 2010 7:51 pm
Location: Chico, CA
Contact:

Re: Installing to either Program Files or Program Files (x86

Postby kendallb » Thu Jul 08, 2010 9:14 pm

Awesome, thanks! That works great!
- Kendall Bennett


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 70 guests