How to install component only if another component is installed?

Mar 17, 2009 at 11:39 AM
Our application integrates with excel, if present. Depending on the Excel version installed, an additional package (PIA) needs to be installed by the boostrapper to make our application work with the corresponding version of Excel. That is, our pre-requisites are dependent on which applications are installed on the user's machine.

Basically, we want a bootstrapper that can support this scenario:

If Excel 2003 is installed
...install PIA for Excel 2003

If Excel 2003 is not installed, don't install PIA for Excel 2003

If Excel 2003 and PIA for Excel 2003 are both installed, do nothing (installation done).

...and analoguous for other Excel versions, then last install our application MSI.

dotNetInstaller has the InstalledCheck element, but can it be used for this scenario? The way I read the docs it does not seem so since I would need two InstalledCheck elements and only install the component for specific combinations.
Mar 17, 2009 at 12:33 PM
You can do this with 1.6, which introduces Not, Or and And operators to checks.

Since checks are there to verify whether the product is installed, for a component to install on excel 2003 only you will need to negate a check that verifies that you have excel 2003 installed and, if it needs to be exclusive, no other version of excel. This might require some mental gymnastics.

Try the latest stable build:
Mar 17, 2009 at 2:24 PM
Edited Mar 17, 2009 at 2:45 PM
Awesome, at first look this is exactly what I need. I'll try it. Appreciate the chm too. Thanks!
Oct 22, 2011 at 12:28 PM

I am trying to do the same thing but i am having problems detecting Office, PIA, Word PIA components, did you managed to accomplish these checks? Thanks.

Oct 24, 2011 at 4:27 PM

If you have some more specific issues (tell us what exactly you're trying, what you expect and what you're getting)  maybe we can help you.