在Inno Setup的Setup部分中使用GetStringFileInfo [英] Using GetStringFileInfo in Setup section of Inno Setup

查看:133
本文介绍了在Inno Setup的Setup部分中使用GetStringFileInfo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在引用 GetStringFileInfo帖子后,我尝试读取程序集信息并将AppNameFileVersion应用于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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆