问题描述
在引用 GetStringFileInfo帖子后,我尝试读取程序集信息并将AppName
和FileVersion
应用于Inno设置脚本如下.
After referencing GetStringFileInfo post, I try to read Assembly information and apply AppName
and FileVersion
to Inno Setup script as below.
但是编译后的安装向导仅显示"GetStringFileInfo("{#RootDirectory}Sample.exe","Title")"
作为软件标题. GetStringFileInfo
根本没有进行处理.如何使它正确运行?
But compiled installation wizard shows just "GetStringFileInfo("{#RootDirectory}Sample.exe","Title")"
as a software title. The GetStringFileInfo
was not processed at all. How can I make it run correctly?
#define RootDirectory "bin\Release\"
[Setup]
AppName=GetStringFileInfo("{#RootDirectory}Sample.exe","Title")
AppVersion=GetStringFileInfo("{#RootDirectory}Sample.exe","FileVersion")
请注意,我使用的是Script Studio,文件位于由Inno Setup向导创建的setup.iss
中.
Note that I'm using Script Studio and the file resides in setup.iss
which created by Inno Setup wizard.
推荐答案
GetStringFileInfo
是预处理器函数. 预处理程序函数的内联调用的语法为:
GetStringFileInfo
is a preprocessor function. A syntax for an inline call of a preprocessor function is:
AppName={#GetStringFileInfo(RootDirectory + "Sample.exe", "Title")}
这篇关于在Inno Setup的Setup部分中使用GetStringFileInfo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!