Managing Error Display for Execution Failure of Event Settings Command

InstallShield 2025

Project: This information applies to the following project types:

Basic MSI
InstallScript
InstallScript MSI
Suite/Advanced UI

InstallShield enables you to manage or control whether an error message is displayed after a successful installer build if a command, specified in the Prebuild Event, Prepare Files Event, Precompression Event, or Postbuild Event settings on the Events tab, fails to execute during build time.

By default, these failures do not trigger an error message after a successful build. You can configure InstallShield to display an error message in such cases by modifying the Settings.xml file. The following instructions explain how to enable error message display for such failures.

Caution:The Settings.xml file contains critical configuration data. Incorrect modifications may cause InstallShield to stop working. Be sure to back up this file before editing.

To enable error message display for a command (specified in the required settings on the Events tab) execution failure:

1. Close InstallShield.
2. Find the Settings.xml file that is installed with InstallShield. Settings.xml is installed in one of the following locations, depending on which language version of InstallShield you are using:
EnglishInstallShield Program Files Folder\Support\0409
JapaneseInstallShield Program Files Folder\Support\0411
3. Create a back-up copy of the Settings.xml file, in case you later need to revert to the original version.
4. Use a text editor or XML file editor to open the Settings.xml file.
5. Search for the <TreatBuildEventFailuresAsErrors> element and its child element. By default, they appear something like this:

<TreatBuildEventFailuresAsErrors default="no"/>

6. Edit and change the default TreatBuildEventFailuresAsErrors parameter to “yes”.

<TreatBuildEventFailuresAsErrors default="yes"/>

7. Save the Settings.xml file.
8. Ensure that your XML code is well formed; if it is not well formed, you may have problems using InstallShield. In most cases, you can identify improperly formed XML code by opening the Settings.xml file in Internet Explorer. Check the code for errors.