Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a destname which includes date and time at installation in Inno Set-up

Tags:

inno-setup

I want to use the [Files] section to create a new file which has the format:

Program Name plus date plus time .fmpur

I'd be grateful for any ideas.

like image 796
John Carpmael Avatar asked Oct 04 '12 13:10

John Carpmael


People also ask

How do I create a custom page in Inno?

Text := 'TMemo'; Memo. Parent := Page. Surface; Lbl := TLabel. Create(Page); Lbl.

How do you write an Inno Script?

The Inno Setup Example Scripts are located in a separate folder. Please click the "Inno Setup Example Scripts" shortcut created in the Start Menu when you installed Inno Setup, or open the "Examples" folder in your Inno Setup directory.


1 Answers

For instance the following way. How to modify a date time pattern, see the GetDateTimeString page:

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

#define FileNamePattern SetupSetting("AppName") + " " + GetDateTimeString('dd-mm-yyyy hh-nn-ss', '-', ':') + ".fmpur";

[Files]
Source: "MyProg.exe"; DestDir: "{app}"; DestName: "{#FileNamePattern}"
like image 182
TLama Avatar answered Oct 14 '22 03:10

TLama