Lukas95
Posts: 2
Joined: Thu Feb 01, 2024 1:54 pm

Prequisite disable install condition check

Hello

I've run into an issue with my installer.
I'm trying to install an FTDI driver as a prerequisite before installing the main Application.

Before installing I check if the driver is already installed, by checking for the .sys file in the drivers folder ('C:\Windows\System32\drivers\ftdibus.sys') and an entry in the registry ('HKLM\SYSTEM\CurrentControlSet\Services\FTDIBUS').

The issue is, both of these entries are only created, once a compatible FTDI device is connected to the PC. This means after the installation of the prerequisite, they do not yet exist, and the installer always prompts, that the prerequisite installation failed, even if the installation worked just fine.

Is there a way to only check for these conditions BEFORE the installation, but disable the check AFTER the installation to check if the installation was succesful?

I don't want to disable the condition, because if I release an update, the condition works fine (since the installation ) and the prerequisite is skipped.

Thank you for any tips.

Best Regards
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Prequisite disable install condition check

Hello and welcome to our forums,

To achieve this, you need to check the "Continue with main installation even if the prerequisite is not installed" option (Installation tab) for that prerequisite.

The install conditions are evaluated by your setup twice:

1. once before the prerequisite is installed. In this case, the conditions should be false (meaning that the prerequisite is not installed), resulting in the prerequisite being scheduled for installation.

2. once after the prerequisite is installed. In this case, the conditions should be true (meaning that the prerequisite was correctly installed).

If the mentioned option is unchecked, the second check I have mentioned above (the check after the prerequisite is installed) will be performed.

Let me know if that helped you.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Lukas95
Posts: 2
Joined: Thu Feb 01, 2024 1:54 pm

Re: Prequisite disable install condition check

Hello

Thank you for the response!

I have checked the option "Continue with main installation even if the prerequisite is not installed". This works fine and the installation of the main package continues successful.

But the issue is not that the installation fails, but the warning dialog prompting that the prerequisite installation failed (even though it worked).

In the FAQ it sais:
"After the installation of prerequisites. Once the prerequisites are installed the associated conditions will be re-evaluated. If the conditions are met then the prerequisites were successfully installed. If the conditions are not met then the installation of the prerequisites failed and the 4154 warning message is displayed."

So basically I'm looking for a way to suppress the '4154 warning', which in my (very unusual) case is prompted incorrectly.

Thank you.
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Prequisite disable install condition check

Hello,
But the issue is not that the installation fails, but the warning dialog prompting that the prerequisite installation failed (even though it worked).
As previously mentioned, this happens when the "Continue with main installation even if the prerequisite is not installed" option is unchecked. After the prerequisite is installed the condition should be true (meaning that the prerequisite was correctly installed). As you specified, the install conditions
are not created at install time, but once a compatible FTDI device is connected to the PC.
which in my (very unusual) case is prompted incorrectly.
The prompt is displayed as expected because the install conditions are not created after the prerequisite is installed. There is no way for the installer to know if the prerequisite has been installed correctly because the install conditions are not created at the time of installation.

I'm afraid the only solution in your case is to check the mentioned option or find a different install condition (which is true right after the prerequisite installation).

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”