Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup setup file name append AppVersion

Tags:

inno-setup

How to append AppVersion to setup.exe file?

In other words, how to make output filename as sample-setup-1.4.2.0.exe?

[Setup]
AppName= {#GetStringFileInfo("Sample.exe", "ProductName")}
AppVersion= {#GetStringFileInfo("Sample.exe", "FileVersion")}

OutputBaseFilename=setup
like image 905
Youngjae Avatar asked Sep 06 '25 03:09

Youngjae


1 Answers

Two valuable lessons are;

  1. Lesson 1: Inline function should be used as {#FunctionName(...)}
  2. Lesson 2: variables in [Setup] field are called by using SetupSetting function.

With above information, we can make sample-setup-1.0.0.0 as below;

OutputBaseFilename=sample-setup-{#SetupSetting("AppVersion")}

Likewise, we can append datetime;

OutputBaseFilename=sample-setup-{#SetupSetting("AppVersion") + GetDateTimeString('dd-mm-yyyy hh-nn-ss', '-', ':')}
like image 172
Youngjae Avatar answered Sep 08 '25 00:09

Youngjae