Pedro Gaspar
Pedro Gaspar

Reputation: 878

AppVersion not showing on InnoSetup window title bar

I was researching a way of putting the app version number on the setup window title of my InnoSetup installer and I found this question: Add Version to SetupWindowTitle of Inno Setup.

On the comments section of the question, @MartinPrikryl stated:

The %1 in SetupWindowTitle is replaced with AppVerName, which defaults to "AppName version AppVersion". So SetupWindowTitle actually contains AppVersion. You must have something wrong in your script.

But in my case the AppVersion property was always set and the version number never showed up on the window title. I thought it had something to do with the language package I was using (Languages\BrazilianPortuguese.isl) but it turns out it's not.

I've made a simple test script to reproduce the behavior:

[Setup]
AppName=Test
AppVersion=1.0
VersionInfoVersion=1.0
DefaultDirName=C:\Test\

I'm using Inno Script Studio version 2.2.2.32 with Inno Setup Compiler version 5.5.9.
When I compile that simple test I get this result:

InnoSetup test installer window title

No AppVersion on window title, just the AppName.
What can it be?

Upvotes: 1

Views: 522

Answers (1)

Pedro Gaspar
Pedro Gaspar

Reputation: 878

It turned out that it was just an InnoSetup version issue (thanks to @MartinPrikryl comment!). I was using InnoSetup compiler version 5.5.9, but with the current 6.0.5 version it works.

Actually, this feature was added on 5.6.0 version (2018-06-08):

Inno Setup 5.6 Revision History

Change in default behavior: If [Setup] section directive DisableWelcomePage is set to yes (which it is by default), then the title of the wizard now includes AppVerName instead of AppName, in other words: it now includes the version number of the application. If WindowVisible is set to yes this applies to the background window instead.

Anyway, in my case I was not totally happy with the result because my installer manages other installers and it's called something like 'Setup Manager'. With the new InnoSetup version the installer window title becomes 'Setup - Setup Manager version 1.0.0.5'.

From 'Default.isl' file, with default English language:

[Messages]
SetupWindowTitle=Setup - %1

Actually I use portuguese language and the real installer name is 'Instalador MyCompany', so the text on the window title becomes 'Instalador MyCompany versão 1.0.0.5 - Instalador'.

From 'Languages\BrazilianPortuguese.isl' file, with Brazilian Portuguese language:

[Messages]
SetupWindowTitle=%1 - Instalador

In both language scenarios the additional word ("Setup" or "Instalador") is too much, so, I changed the SetupWindowTitle property only to %1:

[Messages]
SetupWindowTitle=%1

And now it's fine:

InnoSetup updated test window title

Other source:
Is it possible to change the window title bar of your installer using Inno Setup?

Upvotes: 1

Related Questions