Prerequisits and Custom Parameter - Advanced Installer Community
estrich
Posts: 2
Joined: Fri Nov 14, 2014 5:22 pm

Prerequisits and Custom Parameter

Hello Forum,

We have multiple single AI installer projects which generate exe installers. We then have a "bundle" AI project which bundles all these single installers and installs them as prerequisits.
I'm trying now to install a certain feature from one of the single installer projects only when a command line parameter is set. For this i have specified the "Not installed if:" condition in the feature properties.
The condition reads as follows:

Code: Select all

INSTALL_LICENSE = "0"
When I try to install the exe generated from this single AI project using:

Code: Select all

projectname.exe INSTALL_LICENSE=0
everthing is working as expected and the feature is not installed.
I now want to use this parameter in the "bundle" AI project. When I define

Code: Select all

INSTALL_LICENSE=0
or

Code: Select all

INSTALL_LICENSE="0"
in the "Install Command Lines" "FullUI" field of the prerequisits tab the feature gets installed as if the command line parameter is not transmitted to the exe installer.
If I specify other commands like

Code: Select all

/passive
in this field it's working as expected - but my custom parameter is not recognized it seems.

Any input would be highly appreciated!

Regards,
estrich
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Prerequisits and Custom Parameter

Hello Estrich and welcome to our forums,

If you want to run your "bundle" project using a command line like this:

Code: Select all

bundle.exe INSTALL_LICENSE="0"
and install a feature (contained by a prerequisite) based on the above property, then you should set the "Install Command Lines" fields of your prerequisite like this:

Code: Select all

INSTALL_LICENSE="[INSTALL_LICENSE]"
Also, please keep in mind that your prerequisites must be added as feature-based or post-install prerequisites.

Let us know if this helped, otherwise try to isolate the behavior in a sample or in a detailed step by step test case and send it us (here or to support at advancedinstaller dot com email address) so we can further investigate your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
estrich
Posts: 2
Joined: Fri Nov 14, 2014 5:22 pm

Re: Prerequisits and Custom Parameter

Hello Daniel - thanks for your reply!

Unfortunatly I think we have a little misunderstanding so I try to clarify what my problem is:
The single installer projects are by default installing license files alongside their applications when run - which is what we want.
But we also have a bundle which contains all the application installers from the single installer projects and installs theses as feature based prerequisits. Alongside the applications the bundle is installing a "bundle license" on its own - this is already all working perfectly.

What I want to do now is to disable the feature of the single application installers which is installing the license files, but only when they are started from the bundle installer.
I therefore introduced a new parameter in the single app installers

Code: Select all

INSTALL_LICENSE
and an appropriate check to disable the installation of the license when this is set to 0.

When I try the parameter with the individual installer like this:

Code: Select all

singleInstaller.exe INSTALL_LICENSE=0
it is working as expected - installing the application but not installing the license file.

So next I thought that I would just set this command line parameter in the bundle installer for all of the bundled prerequist installers in the "Install Command Lines" "FullUI" field of the prerequisits tab - essentially doing the same as calling the individual installer with the command line parameter as tested before.
But strangly enough if I set

Code: Select all

INSTALL_LICENSE="0"
or

Code: Select all

INSTALL_LICENSE=0
it's like the parameter is never called on the prerequisit - always installing the license of the single applications.
Just to make sure that other parameters are not ignored I tried to fill in

Code: Select all

/passive
in the "Install Command Lines" "FullUI" field of the prerequisits tab - and strangly enough this parameter is passed correctly and processed by the prerequist.

So I'm not trying to pass a command line parameter from the bundle installer to the prerequists but set a "fixed" command line parameter for them.
If you can't see anything I'm doing wrong I will try to strip out project down and send it to you.

Thanks again for your time!
Cheers,
estrich
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Prerequisits and Custom Parameter

Hello Estrich,

I'm not sure why this happens. I've tested the scenario into a sample, but everything worked as expected. Can you please download and test the attached sample and see if it helps?
sample.zip
(8.16 KiB) Downloaded 242 times
If you could replicate the behavior in the above sample (or in another one) just let us know.

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

Return to “Common Problems”