asif0012
Posts: 51
Joined: Tue Nov 22, 2022 6:30 pm

Failed to properly run custom C++/C# executable as pre-install prerequisites

Hello,
I am using Advanced Installer 20.6 Enterprise Edition.

I want to run some custom C++/C# executable files as "Pre-install Prerequisites". When I execute my installer, they run without any issue.

But if I uncheck the "Continue with main installation even if the prerequisite is not installed" checkbox, then the installer shows the following checkbox and aborts the installation. Even though the executable was successfully executed. I tried to return different exit codes like "0" or "1". But still, the message box appears.
Screenshot 2023-07-13 205222.png
Screenshot 2023-07-13 205222.png (29.67 KiB) Viewed 6249 times
I need to show the mandatory prerequisites using the "PrerequisitesDlg" screen. For this reason, I have to uncheck the checkbox.

How can I run the custom C++/C# executables as "Pre-install Prerequisites" without the above issue? How does Advanced Installer determine if the execution of the prerequisites is successful or not?

Best Regards,
Asif
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: Failed to properly run custom C++/C# executable as pre-install prerequisites

Hello Asif,

The prerequisites are checked based on their install conditions.

These conditions are checked twice:

1. once before the package is installed --> here the condition must be false, meaning the prerequisite is not installed --> the setup should install it

2. once after the package is installed --> here the conditions must be true, meaning the prerequisite was correctly installed

In your case, how do you execute the EXE? Have you added that EXE as pre-install prerequisite despite it not being a legit installation package?

What you could do is have a bootstrapper MSI that only runs the custom action and add that MSI as a pre-install prerequisite, silently.

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

Return to “Common Problems”