2
votes

With Inno Setup, if we choose to keep the prompt dialog (DisableStartupPrompt=False) the displayed message is managed by the localization file with the reference SetupLdrStartupMessage. For instance in English locale file:

SetupLdrStartupMessage=This will install %1. Do you wish to continue?

By default the setup will replace %1 by the name of the application defined by the variable AppName. How to make the text display AppVerName instead ?

I would like to get the following text :

This will install MyApplicationName 4.1. Do you wish to continue?

The Pascal function InitializeSetup() is not a correct option for me for two reasons:

  1. This section is called after the language selection, called itself after the startup prompt. I want to keep this first popup.
  2. It imply to re-write as many custom message as language you manage.
1

1 Answers

2
votes

Make the version be part of the message:

#define MyAppVer "4.1"

[Setup]
AppName=MyApplicationName
AppVersion={#MyAppVer}

[Messages]
SetupLdrStartupMessage=This will install %1 {#MyAppVer}. Do you wish to continue?