renderimage
Posts: 5
Joined: Wed Jul 11, 2012 10:27 am

Complex prerequisite conditions

First of all excuse me for my bad English :oops:
I'm currently trying to migrate our old setup to Advanced Installer (I'm using 9.3 Trial, Professional project).
The software I have to package is a CAD application, it has some old modules written in VBA, so I have to install VBA enabler for some particular AutoCAD versions (2010/11/12/13).
My problem is that there is no individual setup for each CAD, I have to install all the necessary files for all supported AutoCAD versions (so our customer can migrate to another CAD without reinstalling the application).
I've inserted different VBA enablers as prerequisites with appropriate install conditions, but in this way my setup installs all the prerequisites regardless current Autocad version (while still skips the installation for VBA enables which are already there).
I need to add some other condition in order to install only the right VBA enabler and skip all the others (even if they are not installed).
I've already tried to add current to add these condition (let's take ACAD 2010 example):
- check if VBA enabler 2010 is installed (by product/upgrade code)
- check if current CAD version is not 2011
- check if current CAD version is not 2012
- check if current CAD version is not 2013
+ install only if all the condition fail

in this way this VBA enabler installs only if:
- current CAD 2010
- VBA enabler 2010 is not already installed
and this is OK, but at the end of the installation prerequisite has status "Failed", because current CAD version is still different from 2011/12 and 13; this condition cannot be satisfied, never.

So please help me to make it work in the right way.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Complex prerequisite conditions

Hello and welcome to Advanced Installer forums,

In order to install the VBA Enabler 2010 package prerequisite only if version 2010 of CAD package is installed you can proceed like this:
- Go to "Prerequisites" page and select the VBA Enabler 2010 package prerequisite.
- Go to "Install Conditions" tab and check "Install prerequisite based on conditions" option.
- Add the following install condition:
  • Criteria: Product Version (identify by Product Code)
    Product Code: VBA Enabler 2010 product code
- Add a second install condition like this:
  • Criteria: Registry value does not exist
    Registry Value: A specific CAD 2010 registry value
- Enable "Install only if all conditions are false" option.
- Build and run your project.

Also, please make sure that you are using the correct product code of the VBA Enabler 2010 in the "Product Code" field of the first install condition.

If the behavior still persist can you please send us the .AIP (project file) and a download URL of the related prerequisite packages to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”