I am using Inno Setup to generate the installer of my application. How can set the version number of the setup.exe (VersionInfoVersion
) generated by Inno to match with the version number of my application automatically? Now every time I deploy a new version of my application I need to update the version number manually.
Now I'm doing this:
[Setup]
VersionInfoVersion=1.2.2.0 //writing the value manually
I want something like this:
[Setup]
VersionInfoVersion={Get the version of my app}
You can use the Inno Setup Preprocessor GetFileVersion
function like this
#define ApplicationName 'Application Name'
#define ApplicationVersion GetFileVersion('Application.exe')
[Setup]
AppName={#ApplicationName}
AppVerName={#ApplicationName} {#ApplicationVersion}
VersionInfoVersion={#ApplicationVersion}