title: How to suppress prompt of wizard.close
body: <p><strong>What I want to do:</strong></p>
  <p>If the user clicks &quot;Next&quot; on wpWelcome and if an old version of the app is found on the computer, then I prompt a msgbox.</p>
  <p>If the user clicks &quot;cancel&quot; on msgbox then I want to abort installation and close wizard without prompt, just like abort() with TSetupStep, but WizardForm.Close prompts another msgbox to confirm cancelation. Is there any way to suppress this?</p>
  <p>My current code below:</p>
  <pre><code>function NextButtonClick(CurPage: Integer): Boolean;
  begin
    if (CurPage=wpWelcome) then
    begin
      if (AppAlreadyInstalled()) then
      begin
        if MsgBox('Another installation of {#MyAppName} has been detected. 
           Proceeding with &quot;OK&quot; will uninstall the existing program first. 
           Press &quot;cancel&quot; to abort and exit installer.', 
           mbConfirmation, MB_OKCANCEL or MB_DEFBUTTON2) = IDOK  then
        begin
          UnInstallOldVersion();
          Result:= True;
        end
        else
        begin
          Result:= False; 
          WizardForm.Close;
        end;
      end; 
    end;
  end;
  </code></pre>