i start on Prerequisites an installation (Execute a command-line tool)
The return value i saved in the unforeseen property-field.
So now i would break my (main) installation when the return value (of the command line tool) isn't correct.
The checkbox "Continue with main installation even if the prerequisite is not installed" has no impact!?
If the "Continue with main installation even if the prerequisite is not installed" option is unchecked for a prerequisite, the user will not be allowed to uncheck that prerequisite when it is displayed for the installation. It does not break the main installation if an error code is returned.
If you want to stop the main installation based on the return code of a prerequisite, you can save that return code in a property using the "Save return value in this property" field from the "Setup Files" tab, then go in the "Custom Actions" page, add a "Display error message" custom action after the "Install Execution Stage -> Searches" action group and set that property as a condition for it.
Also, please note that if the installation of the main package is done with Basic UI or in silent mode, the "feature-based" prerequisite will be installed after the main installation, so the main installation cannot be blocked based on the prerequisite's return value. In this case, you need to set a condition for the above custom action, so it will not be executed during the basic or silent install. For this you can use the following condition: UILevel = "5"
FOLLOW US
Get the latest news in Application Packaging