How do I make the installer display an error message to the user under certain circumstances?

asked 12 Sep '11, 07:16

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


You can make the installer display an error message to the user if certain conditions are met using a throwError action. Those conditions are expressed by rules as explained in the conditional evaluation chapter of the product documentation included with InstallBuilder. If used inside a parameter <validationActionList> section, an error message will be displayed to the user and the user will be prompted again for the required information. If used in any other action list section, such as <preInstallationActionList>, it will display an error message to the user and the application will exit. The following example code, when placed in <preInstallationActionList> will throw an error and abort the installation if the Apache configuration file is not writable by the current user:

       <throwError>
          <text>The Apache configuration file is not writable by the current user</text>
          <ruleList>
            <fileTest>
              <path>/usr/local/apache/conf/httpd.conf</path>
              <condition>not_writable</condition>
            </fileTest>
          </ruleList>
       </throwError>
link

answered 12 Sep '11, 07:18

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×43
×10

Asked: 12 Sep '11, 07:16

Seen: 1,825 times

Last updated: 15 Sep '11, 10:27