Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I read AssemblyFile information in Inno Setup

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")]

Does anyone know how this might be accomplished?

I know I can get the last one using GetFileVersion("path/to/greatapp.exe") is there something similar for the first two?

like image 455
Nifle Avatar asked Sep 16 '09 13:09

Nifle


1 Answers

Use the GetStringFileInfo() function provided by the Inno Setup Preprocessor (ISPP) as follows:

  1. GetStringFileInfo("path/to/greatapp.exe", "CompanyName")
  2. GetStringFileInfo("path/to/greatapp.exe", "ProductName")
  3. GetStringFileInfo("path/to/greatapp.exe", "FileVersion")

As you have already mentioned, you can use the GetFileVersion() function instead of #3 above.

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.

like image 199
Bernard Avatar answered Sep 23 '22 19:09

Bernard