32/64 Bit Installer - Program Files Location
Posted: Wed Feb 22, 2012 10:12 am
I have an application that runs in 64-bit mode on a 64-bit OS, and 32-bit mode on 32-bit OSs. The installer seems to ALWAYS install the application into the 'Program Files (x86)' directory.
I have added to the top of my installer script to get the 'Processing Architecture' using the 'Get System Setting' function. On my 64-bit Windows 7 OS test machine, that functions returns 'AMD64'. I have added an 'if' for the 'AMD64' value to execute a 'Set 64 Bit Mode' and selected the option to 'Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode'. I placed a message box in the 'if' statement to ensure the 'if' was being executed (it is). Yet, $PROGRAMFILES$ is ALWAYS reporting the '(x86)' location.
I copied this section of the script to execute immediately prior to the setting of the '$TARGETDIR$' variable. Still sets to '(x86)' location.
Although I need the installer to be able to install to 32-bit machines, I even tried checking the '64 bit operating system (puts setup in 64 bit installation mode)' 'Special Requirements' option... (I know this would not work for 32-bit machines).... I have confirmed the added population of the $CHECKSYSTEM$ variable that is at the top of my script after I check this option. I added a messagebox show the value of this variable... it is valued as: TRUE. But even with that checkbox checked, the $PROGRAMFILES$ variable STILL reports the 'Program Files (x86)' location (and hence the $TARGETDIR$ values is under (x86)).
What am I doing wrong or what is it that I don't understand?
I have added to the top of my installer script to get the 'Processing Architecture' using the 'Get System Setting' function. On my 64-bit Windows 7 OS test machine, that functions returns 'AMD64'. I have added an 'if' for the 'AMD64' value to execute a 'Set 64 Bit Mode' and selected the option to 'Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode'. I placed a message box in the 'if' statement to ensure the 'if' was being executed (it is). Yet, $PROGRAMFILES$ is ALWAYS reporting the '(x86)' location.
I copied this section of the script to execute immediately prior to the setting of the '$TARGETDIR$' variable. Still sets to '(x86)' location.
Although I need the installer to be able to install to 32-bit machines, I even tried checking the '64 bit operating system (puts setup in 64 bit installation mode)' 'Special Requirements' option... (I know this would not work for 32-bit machines).... I have confirmed the added population of the $CHECKSYSTEM$ variable that is at the top of my script after I check this option. I added a messagebox show the value of this variable... it is valued as: TRUE. But even with that checkbox checked, the $PROGRAMFILES$ variable STILL reports the 'Program Files (x86)' location (and hence the $TARGETDIR$ values is under (x86)).
What am I doing wrong or what is it that I don't understand?