Hello AI team,
I have to install some prerequisites with my setup.
They need to install if not existing on the target machine.
They need to repair if existing on the target machine and my Main-Setup is run again.
They need to be uninstalled, when the Main-Setup is uninstalled.
For all three scenarios the success of the operation has to be reflected in the exit code of the Main-Setup.
As those prerequisites are a install.exe file which call own msi's, I can't use feature based or chained MSI prerequisites and also no own custom actions.
Because of this limitation, I use pre-install requirement to install my requirements.
That way I can install them when the conditions "Productcode of the requirement doesn't exist" is met.
I can repair them (different commandline then install), by adding the same preinstall prerequisite again, but with the condition "Productcode of the requirement does already exist"
Then I can use the "continue with main installation even if prerequisite is not installed" option, to stop the installation right there. Or I can monitor the success in the Main MSI for a more detailed check.
But triggering the deinstallation proves difficult. Running the uninstallation of the prerequisite as a post-install prerequisite (thus using an asynchronous custom action at the end of the installation) is no option, as I won't be able to be sure, that the uninstallation was successful, as we use SCCM to manage our applications on the clients. The AI Setup.exe would always deliver "success" even if the uninstallation of the prerequisite fails.
So I need to trigger the uninstallation in the pre-install prerequisite section of the AI Setup.exe. But to do this, it would be required to be able to determine, if the AI Setup.exe is called for an uninstallation or for an installation/repair.
As the way to perform an uninstallation of the AI Setup.exe is to call it with the /X parameter, which changes the parameters of the call to MSIEXEC the AI Setup.exe does.
I guess it should be easy to allow the "pre-install prerequisite" section, to "see" that the AI Setup.exe was called with the /X parameter and that way being able to use this information as a "Install condition" for my pre-install prerequisite.
This is also needed to make sure the repair of the pre-install prerequisite isn't triggered, during uninstallation of the AI Setup.exe.
So, what I need as a feature is this:
1. using the information "Does the AI Setup.exe run in INSTALL or in UNINSTALL Mode" in the "Install conditions" of a pre-install requirement (of course supporting REPAIR/UNINSTALL of a pre-install prerequisite from scratch, would be even more awesome, but I guess that would require a more severe change to the AI)
2. Would it be possible to call files not part of the project, but located on the client computer as a "pre-install prerequisite action"? e.g. run Notepad.exe as a pre-install prerequisite.
Kind regards,
Alexander