12

Is it possible to change the title bar of your installer using Inno Setup?

By default is:

AppName=My Program

and when you run the setup in the title bar appears:

Setup - My Program

Is it possible to hide the word "Setup"?

CJBS
  • 15,147
  • 6
  • 86
  • 135
Cosmin
  • 2,354
  • 2
  • 22
  • 39

6 Answers6

22

Add the following lines to your InnoSetup script file:

[Messages]
// define wizard title and tray status msg
// both are normally defined in innosetup's default.isl (install folder)
SetupAppTitle = Setup YourApplicationShortName
SetupWindowTitle = Setup - YourApplicationName YourApplicationVersion

This will modify the "title bar" and the "app title" in the tray.

I would suggest not modifying the default configuration in /innosetup/default.isl, like Sertac Akyuz pointed out. Think of this file as fallback config. If you don't define a setting, then the setting is taken from default.isl. Just modify your file; not the default settings!

Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141
  • 1
    If you need to use additional languages in your setup you should copy every entry in this section and localize it by adding prefix with the language's internal name followed by a period. For example: `russian.SetupAppTitle=Установка`. See InnoSetup help `[Languages] section` to find out language's internal name. – kot-da-vinci Nov 21 '17 at 12:50
4

If you want to change the caption of the main form, try this:

[code]
procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpWelcome then
    WizardForm.Caption := 'Welcome to My Program';
end;

It, unfortunately, will not change the "Setup" caption on the taskbar. Since this is a delphi application, you would need access to the Application global variable to change this effortless, but this object is not exposed to pascal script, and I don't know any way to do it directly. I think you can follow the @satuon advice to change it using windows messages.

jachguate
  • 16,976
  • 3
  • 57
  • 98
3

In the InnoSetup installation folder there's a default.isl file, open that file in a text editor, find the SetupWindowTitle entry and change the right side from Setup - %1 to only %1. Also repeat the process for additional languages you use in the setup, you'll find the matching '.isl' files in the 'Languages' folder.

Sertac Akyuz
  • 54,131
  • 4
  • 102
  • 169
  • 3
    This answer is wrong. It will work, but it is wrong. If you need to override the default messages in Inno Setup then you should use the `[Messages]` section of your setup script file like Jens A Koch suggested. Copy the relevant line from `default.isl` into your script's `[Messages]` section and edit as required. You can still use the `%1` style variables. – Nicolas Sep 13 '16 at 10:57
  • @Nicolas - *"This answer is wrong."* - I don't think a solution that satisfies the problem qualifies as wrong, perhaps you mean "it would be wrong to implement this solution.* – Sertac Akyuz Sep 16 '16 at 16:31
  • Yes, the accepted answer does satisfy the problem, and perhaps it is not actually _wrong_. It depends on what what the problem is: To change the title for _all_ setups created by this Inno Setup configuration then you should modify `default.isl` but if you only want to change the title for a _specific_ setup then you need to add a `[Messages]` section to your script instead. – Nicolas Sep 22 '16 at 09:30
2

A better solution (also if you want to make your iss setup file be correctly compilable on any computer) is to redefine the certain language string in Messages section after the definition of the Languages file.

For example:

[Languages]
Name: de; MessagesFile: compiler:Languages\German.isl
;Name: en; MessagesFile: compiler:Default.isl

[Messages]
WizardReady=I am ready.
Kai
  • 5,850
  • 13
  • 43
  • 63
2

Simple no Codes

[Messages]
SetupWindowTitle=Your Programme Name
Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
G S
  • 21
  • 1
0

You should be able to do that using Pascal scripting. Inno Setup allows you to call SendMessage and PostMessage from your Pascal section. Try to use that to send a WM_SETTEXT message to your window.

sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • This seems kinda hackish, no? An indirect solution that would probably work, mind you, but still not ideal. – Bernard Feb 22 '11 at 20:41