我可以在Inno Setup中读取AssemblyFile信息吗 [英] Can I read AssemblyFile information in Inno Setup
问题描述
我想从我的Inno Setup脚本的application.exe中读取这三个值.
I would like to read these three values from my application.exe in my Inno Setup script.
[assembly: AssemblyCompany("My Company")]
[assembly: AssemblyProduct("My Great Application")]
[assembly: AssemblyFileVersion("9.3.2")]
有人知道如何实现吗?
我知道我可以使用 前两个有类似的东西吗?
I know I can get the last one using GetFileVersion("path/to/greatapp.exe") is there something similar for the first two?
推荐答案
使用
-
GetStringFileInfo("path/to/greatapp.exe", "CompanyName")
-
GetStringFileInfo("path/to/greatapp.exe", "ProductName")
-
GetStringFileInfo("path/to/greatapp.exe", "FileVersion")
GetStringFileInfo("path/to/greatapp.exe", "CompanyName")
GetStringFileInfo("path/to/greatapp.exe", "ProductName")
GetStringFileInfo("path/to/greatapp.exe", "FileVersion")
您已经提到过,可以使用GetFileVersion()
函数代替上面的#3.
As you have already mentioned, you can use the GetFileVersion()
function instead of #3 above.
此外,请查看Inno Setup安装随附的ISPPBuiltins.iss
脚本文件.它包含一个GetFileCompany()
函数来代替上面的#1,并且您可以以类似的方式实现上面的#2.
Also, have a look at the ISPPBuiltins.iss
script file included with your Inno Setup installation. It contains a GetFileCompany()
function to use instead of #1 above and you can implement #2 above in a similar fashion.
这篇关于我可以在Inno Setup中读取AssemblyFile信息吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!