是否可以使用 Inno Setup 更改安装程序的窗口标题栏?

发布于 2024-10-18 16:26:11 字数 198 浏览 1 评论 0原文

是否可以使用 Inno Setup 更改安装程序的标题栏?

默认情况下是:

AppName=My Program

并且当您运行安装程序时,标题栏中会出现:

设置 - 我的程序

是否可以隐藏“Setup”一词?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

甩你一脸翔 2024-10-25 16:26:11

将以下行添加到您的 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 获取。
只需修改你的文件即可;不是默认设置!

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!

待"谢繁草 2024-10-25 16:26:11

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

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

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

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.

游魂 2024-10-25 16:26:11

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

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.

無心 2024-10-25 16:26:11

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

例如:

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

[Messages]
WizardReady=I am ready.

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.
满意归宿 2024-10-25 16:26:11

简单无代码

[Messages]
SetupWindowTitle=Your Programme Name

Simple no Codes

[Messages]
SetupWindowTitle=Your Programme Name
听风念你 2024-10-25 16:26:11

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文