Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6030153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:59:39+00:00 2026-05-23T04:59:39+00:00

I need to change Messages at runtime. I have a AfterInstall procedure that checks

  • 0

I need to change Messages at runtime. I have a AfterInstall procedure that checks to see if a bat file was successful. If it is not, I want to change the value of ExitSetupMessage just before calling WizardForm.Close. I was hoping to do something like this english.ExitSetupMessage := ‘THIS IS THE PART THAT DOES NOT WORK’;. Code examples would be appreciated. Thank you.

[Languages]
Name: english; MessagesFile: compiler:Default.isl

[Files]
Source: {src}\test.bat; DestDir: {tmp}; AfterInstall: ValidateInstall

[Code]
procedure ValidateInstall();
var
  ResultCode : Integer;
begin
  if not Exec(ExpandConstant('{tmp}\test.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
  begin
      english.ExitSetupMessage := 'THIS IS THE PART THAT DOES NOT WORK';
      WizardForm.Close;
  end;
end;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:59:40+00:00Added an answer on May 23, 2026 at 4:59 am

    I don’t know of a way to change the messages at runtime.

    However in the case you posted I know of a workaround. You would set your CustomState before calling WizardForm.Close

    var
      CustomState : Boolean;
    
    procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
    var
     Msg : String;
     Res : Integer;
    begin
     Confirm := False; // Don't show the default dialog.
    
     // Chose which message the custom or default message.
     if CustomState then
        Msg := 'My Custom Close Message'
     else
        Msg := SetupMessage(msgExitSetupMessage);
    
     //as the Question
     Res := MsgBox(Msg, mbConfirmation,MB_OKCANCEL);
    
     // If they press OK then Cancel the install
     Cancel := (Res = IDOK);
    
    end;
    

    The side effect is you lose the Exit Setup? title of the dialog box.

    You can use function ExitSetupMsgBox: Boolean; when you don’t want to change the message
    to keep the title around.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need change background of all text that have two spaces from the start
I have a report made with Crystal Reports 2008 that I need to deploy
I need to change the port number of a USB serial adapter, i have
I need to change the default caption of a MsgBox message box at runtime.
I have runtime dependencies on some external jars that I would like to rejar
I need to change the tray icon, so that it would notify users about
I need to change the structure of the displayed client-side URL. I'm not too
I have a solution file that is built and deployed with the following MSBuild
I need to change my web.config file and add the MaxReceivedMessageSize property in my
I need to change the DataTemplate for items in a ListBox depending on whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.