Page 1 of 1

x64/x84 Prereq in same setup

Posted: Mon Jun 29, 2009 3:14 pm
by jkrasky
Hello,

I'm hoping someone can help me out here. I am trying to build a setup which has both 32-bit and 64-bit setup prereq files included. In order to keep the 64-bit files from forcing the installer to cancel, I have had to make some modifications to the scripts.

I could use a variable which returns 64-bit or not and test against that in each check script which would get around the issue. That seems to work fine. A cleaner way I have found is to simply build a If-Else-End around the include script lines in the main script. If the machine is 64-bit then the 64-bit prereqs scripts get included, if it's 32-bit the 32-bit scripts get included. This also seems to work fine.

However, one script is a problem. The checkvc91 and checkvc91_x64 scripts contain labels. These generate a "LABEL statements cannot be nested inside loops/conditionals" error on build.

Short of completely writing a different set of scripts to install to install Microsoft Visual C++ Runtime 9.0 SP1, is there some easy way to modify the provided scripts so they will function in the manner I'm trying to use them? I'm assuming someone at InstallAware has built an installer including both 32-bit and 64-bit of this component.

Any help would be greatly appreciated. This is almost working except for this one prereq. Thanks in advance!

-Jeff

Posted: Wed Nov 18, 2009 11:09 am
by Bjarne
*bump*

Posted: Tue Nov 24, 2009 1:31 pm
by jkrasky
Hey everyone,

Here is one solution using labels and GoTos. In this case, you have to set the WIN64BIT variable beforehand with a test Get System Settings for capability Windows in 64-bit Mode.

Comment: If running a 64-bit OS, run the PREREQ check in 64-bit
if Variable WIN64BIT Equals TRUE
GoTo Label: X64CHECK
end
Comment: If running a 32-bit OS, run the PREREQ check in 32-bit
if Variable WIN64BIT Equals FALSE
GoTo Label: X84CHECK
end
label: X64CHECK
Include Script: checknet20sp2_x64
Include Script: checkmsxml60_x64
Include Script: checknet30_x64
Include Script: checknet30sp2_x64
Include Script: checknet35sp1_x64
Include Script: checkvc91_x64
GoTo Label: CONTINUE
label: X84CHECK
Include Script: checkmdac281
Include Script: checkmsi31
Include Script: checknet2sp2
Include Script: checkmsxml60
Include Script: checknet30
Include Script: checknet3sp2
Include Script: checknet351
Include Script: checkvc91
GoTo Label: CONTINUE
label: CONTINUE