0
votes

The default Title of a Inno Setup Form is

Setup - %1

where %1 will be replaced by AppName from [Setup]-Section. I want to add the Version like this

Setup - MyProgramm 2.07.5

I've already managed to change the title by adding the [Messages]-Section and define the SetupWindowTitle. But this is fixed and i can't add the version string.

[Messages]
SetupWindowTitle=Setup - {AppName} {AppVersion}

This will result in

enter image description here

2

2 Answers

2
votes

OK, I've found my mistake. The right syntax is

[Messages]
SetupWindowTitle=Setup - {#MyAppName} {#MyAppVersion}

And define some parameters at the beginning

#define MyAppName "MyProgram"
#define MyAppVersion GetStringFileInfo("package\MyProgram.exe", "FILEVERSION")

[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
0
votes

Set the AppVersion directive:

[Setup]
AppVersion=2.07.5

The value gets automatically into the SetupWindowTitle (indirectly via the default value of AppVerName directive).

You need Inno Setup 5.6 or newer.


You can also read the version from the executable:

[Setup]
AppVersion={#GetFileVersion(AddBackslash(SourcePath) + "MyProg.exe")}

See: