Page 1 of 1

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

Posted: Thu Jul 08, 2010 7:59 pm
by kendallb
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 :).

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

Posted: Thu Jul 08, 2010 8:24 pm
by MichaelNesmith
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 :)

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

Posted: Thu Jul 08, 2010 9:14 pm
by kendallb
Awesome, thanks! That works great!