cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
IlkkaV
Level 7

Checking conditions before installing prerequisites

Is there any good solution for checking launch conditions before installing prerequisites? I'm installing a VSTO add-in for Excel and I'd rather check that Excel is there before installing .NET and the VSTO runtime as prerequisites. The add-in works in Excel 2007 and Excel 2010, so at least one of those should be present on the target machine before continuing with .NET and VSTO setup (if needed).

First I thought about including check for Excel presence into the prerequisites, so that if Excel is not there, the installation would continue until the launch conditions complain about Excel not being found. However, as there are two Excel versions to check, this cannot be done as the Prerequisite Editor does not allow any logic for prerequisite conditions (run if foo OR bar is there).

Then I thought about creating two versions of the .prq files, those that check for Excel 2007 and those that check for Excel 2010. However, there's the problem that the .prq file names are the texts that are displayed also to the user, so it's hard to name the prerequisites so that a) advanced users don't get too suspicious (at least I'd be curious why e.g. VSTO runtime claims it's for Office 2007 even though it's the same package for both versions), b) we don't get confused ourselves. We've already run into this issue with needing different reboot behaviors for two different packages and therefore having two almost identical prerequisites with only a minor difference in the name without seeing the relevant difference in the name. As a result I've accidentally added the wrong version when creating a new installer.

So the following improvements would make life much easier for us:
-Allow checking for launch conditions BEFORE installing prerequisites
-Allow basic boolean logic in the prerequisite editor for prerequisite conditions
-Make it possible to define a display name for prerequisites that's not tied to the file name. That way we could have .prq files with descriptive filenames while still displaying a nice and clean name to the users in the prerequisite dialog.

But if anyone has a clever solution with the current functionality, I'd be more than happy to hear it.
Labels (1)
0 Kudos
(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Suite projects in IS2012 address all three of your points. Unfortunately there's nothing new for prerequisites in either IS2011 or IS2012 that helps with this. The only other work-around I can imagine is wrapping your installation in another, e.g. an InstallScript installation which serves as a launcher. It could verify your launch conditions before launching the installation you really want to run.
0 Kudos
EGMuser
Level 3

To the question about:

"Allow checking for launch conditions BEFORE installing prerequisites"

I actually had to deal with the same issue. Unfortunately, I didn't find any good answers, but I did find the following 2 possible solutions by doing a google search:

Option 1 - Make your prerequisites as prerequisites to some specific feature of your product. This causes the prerequisites check to be done after the system check and other conditions are done. I implemented this solution, but what I didn't like about it is that when your installer package is cached, only the msi is cached and it is missing the prerequisites. So if you try to run maintenance mode from Programs and Features, you -may- get a prompt that the prerequisites are not present, and whether you would like to search for the original setup.exe file. This only happened in one of the systems we tested with though, so I don't know how to reproduce this issue...

Option 2 - I didn't actually try this one, but... I believe you can edit your prerequisites so that they are installed only on systems that also match your overall system prerequisites, and in doing so, it won't prompt for installation on systems where the installation would not be allowed. For example, if you have a precondition to only let people install on Server 2008 R2, and .NET framework was a prerequisite, you can change the prerequisite definition for .NET Framework to only be installed in Server 2008 R2 also. This requires editing the original prerequisite definition file (or making a copy) and I didn't like this option either... 😞

Anyways, just passing along my experience with this issue in case it helps...
0 Kudos