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

前端 未结 6 1006
日久生厌
日久生厌 2021-02-14 08:56

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

相关标签:
6条回答
  • 2021-02-14 09:09

    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.

    0 讨论(0)
  • 2021-02-14 09:17

    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.
    
    0 讨论(0)
  • 2021-02-14 09:17

    Simple no Codes

    [Messages]
    SetupWindowTitle=Your Programme Name
    
    0 讨论(0)
  • 2021-02-14 09:19

    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.

    0 讨论(0)
  • 2021-02-14 09:21

    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!

    0 讨论(0)
  • 2021-02-14 09:22

    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.

    0 讨论(0)
提交回复
热议问题