20

I have an application with version information which I would like to include into the setup output filename. For instance if the application have version 3.10.1 I would like to get setup_3.10.1.exe output file instead of a default setup.exe as an output file generated by Inno Setup.

Is it possible to include version information of a certain application into the setup output filename ?

TLama
  • 75,147
  • 17
  • 214
  • 392
Christian Rockrohr
  • 1,045
  • 1
  • 14
  • 29

1 Answers1

31

Use the OutputBaseFilename directive and assign to its value result of the GetFileVersion preprocessor function:

#define AppVer GetFileVersion('MyApp.exe')

[Setup]
OutputBaseFilename=setup_{#AppVer}
...
TLama
  • 75,147
  • 17
  • 214
  • 392
Alex K.
  • 171,639
  • 30
  • 264
  • 288