Prerequisite installed - Advanced Installer Community
francis.matamoros
Posts: 15
Joined: Fri Mar 23, 2018 7:39 pm

Prerequisite installed

Hi. How can I know if a prerequisite, in this case SQL Server, has been installed during the installation? I would need to know if it has been installed or not because if it was installed as a prerequisite data server, database, user, password ... I would not need to request them from the user, since I have configured them when installing the prerequisite.
That is, can it be saved in a property if a prerequisite has been installed? Beware that I do not want to know if the machine has the prerequisite or not, but if the installer launched the installation.

Thank you.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite installed

Hello Francis,

In order to achieve this, you can make use of the "Install Conditions" section ("Prerequisites" page --> select your prerequisite --> "Install Conditions" tab).

The respective condition is checked two times:

- first time, it must be evaluated as false. If this is evaluated as true, it means that the prerequisite is already installed and there is no need to try to install it again, so the prerequisite installation is skipped. If it is evaluated as false, it means that the prerequisite is not installed => the prerequisite installation must be done.

- second time, it must be evaluated as true. After the prerequisite is installed, the check is done once again, to make sure that the prerequisite was correctly installed.

With that being said, you can use the respective condition in your scenario.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
francis.matamoros
Posts: 15
Joined: Fri Mar 23, 2018 7:39 pm

Re: Prerequisite installed

Hello Catalin, I think I explained what I need properly.
My intention is to know if a prerequisite has been installed during the installation, just at that moment, not whether it is installed or not. Maybe you have explained it to me correctly, but I do not understand it.
There is some property or some way to implement it so that it can be used later and know if one of the prerequisites has been installed.
I explain the concrete scenario:
One of the prerequisites for my installer is SQL Server.
- If it is not installed, the installer installs it with a certain instance and a certain "sa" password. If this is the case, in a subsequent dialog box it is not necessary to request the connection data, since I specified them during the installation through "Install command lines" as follows:
/ QS / ACTION = Install / HIDECONSOLE / INSTANCENAME = IDEOWARE / SAPWD = XXXX ....
In this case, the connection string that I need, I already know it, since I have specified all the data during the installation of the SQL Server prerequisite.
- If SQL was previously installed before executing my installation, the user must provide the connection data (Server or instance, user, password, ...), since I need them to mount an appropriate connection string.
What I want to avoid is to request the data when
I hope that explains it better.
Thank you.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite installed

Hello Francis,

Thanks for the detailed explanation.

Here is how you can proceed. If the SQL Server is added as a pre-install prerequisite, please move to to feature-based prerequisites in the "Prerequisites" page. Also, please be aware that starting with SQL Server 2008R2 SP2 (up to 2014) the SQL Server setup package cannot be installed as a Feature-based or Post-install software prerequisite due to a SQL Server setup problem. When added as a feature-based or post-install prerequisite the SQL Server installation hangs because the SQL Server setup it attempts to shut down the windows installer service (msiserver).

For more information about this, please have a look on our "Why does the SQL Server installation hangs?" and "How can I install the SQL Server as a feature-based prerequisite?" articles which I think you may find useful.

After doing so, please go to "Search" page and create a search based on the prerequisite's install conditions ("Prerequisites" page --> (your prerequisite) --> "Setup FIles" tab --> "Install conditions" section).

After creating the search, you can use it to condition your dialog. For instance, if you want to show your dialog based on a condition, you can simply go to "Dialogs" page --> right click on your dialog --> "Show only if...". Please keep in mind that this feature is available starting with an Enterprise project type or above.

Hope this helps.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
francis.matamoros
Posts: 15
Joined: Fri Mar 23, 2018 7:39 pm

Re: Prerequisite installed

Thanks Catalin, I will check that it works
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite installed

You're always welcome, Francis.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”