GrayFox
Posts: 8
Joined: Wed Jan 23, 2019 9:07 pm

Installation Order of Operations

I have a suite installer that presents the user with features that he/she can select for installation. One of the features 'Required SQL Tables' is a SQL database connection that inserts application required records into their database. The scripts will run correctly if its feature is the only one selected. The records that the script inserts are required for all other features to run since the services require SQL for configurations. If other features are selected along side the 'Required SQL Tables' feature, the install will fail since the other features need the 'Required SQL Tables' feature to run first. How would I ensure that the 'Required SQL Tables' feature is always ran first when selected?

I have tried placing the SQL insert scripts in their own .msi inside the suite and adding them as a prerequisite. But for whatever reason the user inputted properties are not being passed to the silent .msi from the suite installer. I know that the order of prerequisites will install in that order. If I could get this working, then I wouldn't have to worry about my previous paragraph's attempt. Help!
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation Order of Operations

Hello,

Since you have mentioned that you have a suite installation, I imagine that the features you are talking about are actually feature-based prerequisites (please correct me if I'm wrong).

If that is the case, the order is actually dictated by the prerequisite's order. For instance, let's say you have Prereq1 and Prereq2. If you add them as it follows:

Prereq1
Prereq2

then that will be the order. If you add them as:

Prereq2
Prereq1

then the Prereq2 will be installed first, followed by the installation of Prereq1.

With that being said, if you want to install the "Required SQL Tables" first, you should place it at the top of the list.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GrayFox
Posts: 8
Joined: Wed Jan 23, 2019 9:07 pm

Re: Installation Order of Operations

Catalin,

You are correct in your assumption. And, in my suite installation I have the prerequisites in the order they need to be installed. Is there a case where user inputted properties are not passed from the suite installer to the feature's .msi?
GrayFox
Posts: 8
Joined: Wed Jan 23, 2019 9:07 pm

Re: Installation Order of Operations

I figured out how to pass all the values of each user inputted parameter to the .msi. I needed to specify each parameter in the install command lines.

The only active issue now is that when the .msi runs (it is only completes a SQL script), the installer says that it failed. Even though the script completed successfully. My assumption is that there isn't a way for the installer to check that the .msi successfully ran the script. Thoughts?
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation Order of Operations

Hello,
I figured out how to pass all the values of each user inputted parameter to the .msi. I needed to specify each parameter in the install command lines.
I am glad you figured out how to pass the parameters to your prerequisites.

In what regards your second question, please allow me to explain this a little bit:

- if you go to "Prerequisites" page --> "Install Conditions" tab, there is a section there named "Install Conditions".

- here, you can specify 1 or more conditions that will decide whether your prerequisite will be installed & was installed correctly

For this moment, let's assume we have only one condition

- the above mentioned conditioned is verified twice:

-- before the prerequisite is installed --> the condition must be false => the prerequisite will be installed, otherwise it will not be installed

-- after the prerequisite was installed --> the condition must be true => the prerequisite was installed correctly, otherwise it was not installed correctly

In your case, most probably, the condition is evaluated as false (after your prerequisite was installed), therefore the installer will throw an error (even if, as you have mentioned, the script was successfully executed).

In order to fix this, you can either create a valid condition (that will be false before installing the prerequisite and true afterwards) or you can to the "Properties" tab of your prerequisite and check the "Continue with main installation even if the prerequisite is not installed" (basically, this option means that the condition will not be checked for a second time)

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GrayFox
Posts: 8
Joined: Wed Jan 23, 2019 9:07 pm

Re: Installation Order of Operations

Thank you for the reply. The prerequisite property, "Continue with main installation even if the prerequisite is not installed." is already checked. Either that property doesn't work or it does not apply to my installer. I've messed with a few install conditions. But, none seem to be applicable to suppress the install failure message.
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation Order of Operations

Hello,

Please keep in mind that this is the default behavior. If the prerequisite somehow fails (or its condition is evaluated as false on the second check), the main installation will notify you about this. However, if you choose "Yes", the main installation will continue (basically the second condition is ignored).

If you want to avoid the message box, you can go to "Install Conditions" tab and select "Always install prerequisite" option. This way, there will be no conditions to be checked.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”