Can I customise / add buttons to the showQuestion dialog?

Comments

1 comment

  • Avatar
    juanjo

    We have a <validatedActionGroup> option that displays an abort-retry-ignore dialog in case of error but the buttons are not configurable. Maybe you could use it (in a variation that only shows two buttons) and show the kill option if in the retry the process is still running:

        <setInstallerVariable>
            <name>first_time</name>
            <value>1</value>
        </setInstallerVariable>
        <while>
          <actionList>
            <validatedActionGroup showMessageOnError="0" type="abortRetry">
              <severity>warning</severity>
              <text>The application is still running. Please close it and retry or abort to exit the update</text>
              <actionList>
                <actionGroup>
                  <actionList>
                    <showQuestion>
                      <default>yes</default>
                      <text>The application is still running. Would you like us to try to kill it?</text>
                      <variable>answer</variable>
                    </showQuestion>
                    <kill>
                      <name>appname</name>
                      <ruleList>
                        <isTrue value="${answer}"/>
                      </ruleList>
                    </kill>
                  </actionList>
                  <ruleList>
                    <isFalse value="${first_time}"/>
                  </ruleList>
                </actionGroup>
                <setInstallerVariable>
                  <name>first_time</name>
                  <value>0</value>
                </setInstallerVariable>
                <throwError>
                  <text>the application is still running</text>
                  <ruleList>
                    <processTest>
                      <logic>is_running</logic>
                      <name>appname</name>
                    </processTest>
                  </ruleList>
                </throwError>
              </actionList>
              <ruleList>
                <processTest>
                  <logic>is_running</logic>
                  <name>appname</name>
                </processTest>
              </ruleList>
              <onErrorActionList>
                <exit exitCode="1">
                  <ruleList>
                    <compareValues value1="${popup_exit_code}" logic="equals" value2="2"/>
                  </ruleList>
                </exit>
              </onErrorActionList>
            </validatedActionGroup>
          </actionList>
          <conditionRuleList>
            <processTest>
              <logic>is_running</logic>
              <name>appname</name>
            </processTest>
          </conditionRuleList>
        </while>
    

Please sign in to leave a comment.