10

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"?

4

6 回答 6

19

将以下行添加到您的 InnoSetup 脚本文件:

[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

这将修改托盘中的“标题栏”和“应用程序标题”。

我建议不要修改中的默认配置/innosetup/default.isl,就像 Sertac Akyuz 指出的那样。将此文件视为后备配置。如果您未定义设置,则该设置取自default.isl. 只需修改您的文件;不是默认设置!

于 2012-01-22T19:05:39.050 回答
3

在 InnoSetup 安装文件夹中有一个default.isl文件,在文本编辑器中打开该文件,找到SetupWindowTitle条目并将右侧从更改Setup - %1为 only %1。还要对您在设置中使用的其他语言重复该过程,您将在“语言”文件夹中找到匹配的“.isl”文件。

于 2011-02-23T18:58:20.513 回答
3

如果要更改主窗体的标题,请尝试以下操作:

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

不幸的是,它不会更改任务栏上的“设置”标题。由于这是一个 delphi 应用程序,您需要访问 Application 全局变量来轻松更改它,但是这个对象没有暴露给 pascal 脚本,我不知道有什么方法可以直接做到这一点。我认为您可以按照@satuon 的建议使用 Windows 消息对其进行更改。

于 2011-02-22T16:22:03.550 回答
2

一个更好的解决方案(如果你想让你的 iss 安装文件在任何计算机上都可以正确编译)是在语言文件定义之后Messages的部分中重新定义特定的语言字符串。

例如:

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

[Messages]
WizardReady=I am ready.
于 2014-06-29T17:00:21.967 回答
2

简单无代码

[Messages]
SetupWindowTitle=Your Programme Name
于 2018-12-14T04:44:04.197 回答
0

您应该能够使用 Pascal 脚本来做到这一点。Inno Setup 允许您从 Pascal 部分调用 SendMessage 和 PostMessage。尝试使用它向您的窗口发送 WM_SETTEXT 消息。

于 2011-02-22T10:50:55.347 回答