Balaji Vignesh
Balaji Vignesh

Reputation: 456

Use language of previous previous installation without asking with Inno Setup?

In Inno Setup, while updating an application, how to get the language of the previous installation and skip asking for language again?

During the first time installation, the languages listed in the [Languages] section for example,

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "hindi"; MessagesFile: "compiler:Languages\Hindi.islu"

would be displayed to the user.

When the application is being updated, I want to skip the language selection and use the same language that the user has selected in the previous installation.

Upvotes: 2

Views: 839

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202272

First, you better do not display the language selection dialog at all.

Let Inno Setup pick the right language according to system language by setting ShowLanguageDialog to auto:

[Setup]
ShowLanguageDialog=auto

To answer your actual question: By default Inno Setup does not show the language selection dialog on upgrade, as UsePreviousLanguage is set to yes by default.

[Setup] 
UsePreviousLanguage=yes

Make sure you didn't set it to no inadvertently. Or that your installation does not meet requirements (like AppId without constants).

Upvotes: 3

Related Questions