• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 759
  • Last Modified:

Conditionally Installing external .msi packages depending on X64 Processor

Does anyone have an InstallShield script that conditionally launches either of two external .msi installers depending on the processor /  OS being 64-bit?  No mnatter, but the installers are for sQL Server Compact 4.0.

Thanks to anyone who will help.  I don't have time to become an expert in InstallShield.

Alternatively, I could like with a launcher
0
NeilCampbell
Asked:
NeilCampbell
  • 6
  • 4
  • 3
1 Solution
 
CSI-WindowsCommented:

Two MSI's cannot be in the InstallExecuteSequence at one time (except for Nested MSI custom actions).  This includes having the launcher you are mentioning and the selected 32 or 64 bit MSI at the same time.

Here are some options:
*) Review your reason for using an MSI simply for branching between two MSIs.  It might be better to do a setup.exe.  If you are getting demand for a raw .MSI for deploying through group policy (or other reason) - then create special instructions (on your website, etc) that tell the end user they can deploy the 32-bit MSI to 32-bit Windows and 64-bit MSI to 64-bit Windows.  Although it's not entirely convenient, using MSI in a non-standard way may result in even more frustration int he long run.

*) Nest MSI's custom actions (http://support.microsoft.com/kb/306439). These have been depreciated by Microsoft, but would still work if you chose to do them.  However, most of the downsides to nested MSIs have to do with running multiple MSIs - if you actually only run the wrapper and ONE sub-MSI, it might be workable.

*) Use MSI 4.5's "Package Chaining" (http://msdn.microsoft.com/en-us/library/windows/desktop/bb736322(v=VS.85).aspx). This depends on MSI 4.5 being on the client.  Any version of InstallShield that supports 4.5 or later can help you build a chained package.

Hope that helps.
0
 
NeilCampbellAuthor Commented:
Thank you much.  I'll look into the links.
0
 
Vadim RappCommented:
Installshield 2012 can. Source: http://www.flexerasoftware.com/products/installshield/features.htm:

"A single installation that includes both 32-bit packages and 64-bit packages and runs only the appropriate packages on each target system."
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
NeilCampbellAuthor Commented:
Thank you very much.  That will make the $2800 price tag worth it!
0
 
NeilCampbellAuthor Commented:
Thank you.  I'll use InstallShield 2012 instead.
0
 
Vadim RappCommented:
I'm curious: your last comment, as well as before-the-last one (unless it was a sarcasm) indicates that you are going to follow http:#36900678. Then why wasn't it part of the accepted solution?
0
 
NeilCampbellAuthor Commented:
Vadimrapp1: No, I wasn't using sarcasm.  I'd never do that when people are being generous to help me.  I still don't know how to use this forum interface perfectly.  Anyway, I didn't see the link you mentioned (http#36900678) in your earlier answer.  I first responded to that answer and said I would try that approach. But when I later found out that InstallShield 2012 will do what I need I'd much rather take that route since I could build the Sql Compact installation into installation of my app.  Sorry for the mixup.
Neil
0
 
Vadim RappCommented:
Speaking of price tags, I'd think that using SFX made by winrar or winzip, with both 32-bit and 64-bit MSI's inside, would also make the trick. Upon extraction, it could run a simple script that would look at the environment variable PROCESSOR_ARCHITECTURE, and launch one or another MSI.
0
 
NeilCampbellAuthor Commented:
Thank you vadimrapp1, I'll try that first.  Money's real tight right now and I already own Winzip.
0
 
Vadim RappCommented:
As a side comment, if the same Microsoft sees no problem to offer separate installations of SQL Server Compact for x32 and x64 at http://www.microsoft.com/download/en/details.aspx?id=17876, are you sure it's necessary to be better than they and integrate? plus, if your installation is to be downloaded, this means double the size...
0
 
CSI-WindowsCommented:
As a follow up to vadimrapp1, you won't want to check the Process level "PROCESSOR_ARCHITECTURE" variable as that is per process bitness.

So if you compiled the EXE as 32-bit it would say the process is 32-bit, if you compiled it 64-bit it would say the machine is 64-bit.

You would need to make an API call to get the system context version of this variable (see http://technet.microsoft.com/en-us/library/ee156595.aspx)

Another method that works on Windows 7 is if %ProgramFiles(x86)% EXISTS, then you are on a 64-bit machine, regardless of process.  I don't know if %ProgramFiles(x86)% exists on 32-bit process on 64-bit Windows.  In Windows 7 Microsoft synced up a lot of environment variables to be available in both 32 and 64-bit (e.g. %ProgramW6432%). Details at the very bottom of: http://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx
0
 
CSI-WindowsCommented:
Opps - for line 2 of the previous post - meant to say "...it would say the machine is 32-bit, if you compiled it 64-bit it would say the machine is 64-bit but would really be reporting the process level bitness."
0
 
NeilCampbellAuthor Commented:
To SouthMod: I'm grateful for all the suggestions, but I will probably go the InstallShield 2012 route since we need a one-click installer if we can get it.  I will review the question now...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now