handling yes or no in question dialogue



  • Avatar

    Ok, I added the following code to exit the installation if the variable continue_installation that is defined by "showquestion" dialogue is false. But irrespective of I press "yes" or "no" from the showquestion dialogue, the installer just exits. So, there is not effect. I feel I'm not accessing the "continue_installation" variable defined in the "showquestion" dialogue. Would you please let me know how to access the variable correctly? - <exit> <customerrormessage>Installation aborted ${continue_installation}</customerrormessage> <rulelist> <isfalse> <value>continue_installation</value> </isfalse></rulelist> </exit>

  • Avatar

    Try checking the value of the <showquestion> equals vs the values "yes" and "no".

    Here's how I use it. I have an <exit> action where I check the variable for the value "no", and if it is not no then allow it to proceed, which allows simpler code in the case where the <showquestion> is not executed because its <rulelist> says it does not need to be displayed.

          <explanation>Warn the user they are about to downgrade and allow them to abort installation.</explanation>
          <text>A newer version ${previousVersion} is already installed on this computer. Are you sure you want to continue and downgrade to version ${project.version}?</text>
              <value2>Unknown variable</value2>

Please sign in to leave a comment.