是否可以使用 Inno Setup 更改安装程序的窗口标题栏?
是否可以使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
将以下行添加到您的 InnoSetup 脚本文件中:
这将修改托盘中的“标题栏”和“应用程序标题”。
我建议不要修改
/innosetup/default.isl
中的默认配置,正如 Sertac Akyuz 指出的那样。将此文件视为后备配置。
如果您未定义设置,则该设置将从
default.isl
获取。只需修改你的文件即可;不是默认设置!
Add the following lines to your InnoSetup script file:
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!
如果您想更改主窗体的标题,请尝试以下操作:
不幸的是,它不会更改任务栏上的“设置”标题。由于这是一个delphi应用程序,您需要访问Application全局变量才能轻松更改此对象,但该对象未暴露给pascal脚本,并且我不知道有什么方法可以直接执行此操作。我认为您可以按照 @satuon 建议使用 Windows 消息更改它。
If you want to change the caption of the main form, try this:
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.
在 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 theSetupWindowTitle
entry and change the right side fromSetup - %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.更好的解决方案(如果您想让 iss 安装文件在任何计算机上都能正确编译)是在 Messages 部分的定义之后重新定义特定语言字符串。语言文件。
例如:
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:
简单无代码
Simple no Codes
您应该能够使用 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.