我可以在Inno Setup中读取AssemblyFile信息吗 [英] Can I read AssemblyFile information in Inno Setup

查看:76
本文介绍了我可以在Inno Setup中读取AssemblyFile信息吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的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?

推荐答案

使用 功能如下:

  1. GetStringFileInfo("path/to/greatapp.exe", "CompanyName")
  2. GetStringFileInfo("path/to/greatapp.exe", "ProductName")
  3. GetStringFileInfo("path/to/greatapp.exe", "FileVersion")
  1. GetStringFileInfo("path/to/greatapp.exe", "CompanyName")
  2. GetStringFileInfo("path/to/greatapp.exe", "ProductName")
  3. 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屋!

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