32/64 Bit Installer - Program Files Location

Got a problem you cannot solve? Try here.
Post Reply
lscott1123
Posts: 3
Joined: Thu Oct 09, 2008 8:08 am

32/64 Bit Installer - Program Files Location

Post by lscott1123 »

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?
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: 32/64 Bit Installer - Program Files Location

Post by FrancescoT »

Dear User,

If I have not missed something, you want to build an 32/64 bit setup combined in one installer.
If this is true, please have a look at this topic: http://www.installaware.com/forum/viewt ... f=2&t=6258

Then also have a look to the template setup "Win 64 setup" and the "Set 64 Bit Mode" help file inside IA, those should helps you.

Tell me if helps you.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
lscott1123
Posts: 3
Joined: Thu Oct 09, 2008 8:08 am

Re: 32/64 Bit Installer - Program Files Location

Post by lscott1123 »

Thanks for the quick reply.

I have seen this documentation and I believe I described that I am following the recommendations already... But in all cases, on the target box, after running the installer, the application is ALWAYS deployed to the 'Program Files (x86)' directory.

Let me also say that the deployed application runs in 64-bit mode on a 64-bit target machine without an issue (no '*32' in task manager for the EXE) so the execution does not seem to be a problem. But I have received a complaint that even when running in 64-bid mode, the application is deployed on the target box under the 'Program Files (x86)' folder. This does not seem to be correct and the link you provide does not seem to mention this target directory at all.

Sorry if I missed something...
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: 32/64 Bit Installer - Program Files Location

Post by FrancescoT »

Sorry,

are you doing something like this to set ProgramFiles folder?

Set Variable ISWINDOWS64BIT to FALSE
Get System Setting Windows in 64 bit Mode into ISWINDOWS64BIT
if Variable ISWINDOWS64BIT Equals TRUE
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
else
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end

Get Folder Location System->Program Files Directory into PROGRAMFILES

Let me Know.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
tcgielow
Posts: 14
Joined: Tue Nov 09, 2010 8:18 am

Re: 32/64 Bit Installer - Program Files Location

Post by tcgielow »

It seems to me to be a bug. I had the same issue and finally figured out the cause. A pre-req for my install is .NET 4 x64. In fact, our app is only designed for x64 machines. Anyway, you get two include scripts when you check the box for .NET 4 x64 'checknet4aip_x64' and 'setupnet4aip_x64'. If you look carefully at these, you will see at the end it sets it back to Win32. Well, the install does these checks up front AFTER is does the section "Check Application Requirements" Therefore, it will always be set to Win32 install which is why you always will get the non x64 program files directory.

So all you need to do is edit these two files and remove the line of code that sets it back.

Keep in mind however, that this is only valid if you know you will not support Win32.

Tom
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: 32/64 Bit Installer - Program Files Location

Post by FrancescoT »

Dear Tom,

many thanks for your comments ... I will Forward to dev team.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
ChrisClarkNZ
Posts: 4
Joined: Fri Nov 18, 2011 8:09 am

Re: 32/64 Bit Installer - Program Files Location

Post by ChrisClarkNZ »

Hi,

An alternative to commenting out the included scripts is to add a line in the MSIcode section after the include script commands have been called to reset the installation mode to x64.

i.e. copy and paste the line from earlier that looks like
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode.
WKleinschmit
Posts: 7
Joined: Tue Feb 26, 2013 6:24 am

Re: 32/64 Bit Installer - Program Files Location

Post by WKleinschmit »

I had the same issue with the script checkvc10_x64 (Microsoft Visual C++ 2010 x64 Runtime - 10.0.30319) but ChrisClarkNZ's suggestion worked.
Maybe you should have dev check that script too?
Or all of them, while they are at it? :wink:
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: 32/64 Bit Installer - Program Files Location

Post by FrancescoT »

Dear User,

It is not a bug or an unwanted behaviour.

the "Set x64 - Native 64 bit Windows .... installation mode" command should be placed at least once, within the "Define Setup Globals" code region of your Main script.

If you follow this rule you will never have any problem.

Regards.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply