Get setup_file file name

How to get the Exe file name of the installation file itself?

I want the exe file name to be written to a variable in the inno script setting.

Inno Version 5.5.3

+4
source share
1 answer

You can extract your installation exe name from the {srcexe} constant, and the record as a custom variable string.

Example:

 ExtractFileName(ExpandConstant('{srcexe}')) 

In code:

  [Code] function InitializeSetup: Boolean; var SetupName : String; begin SetupName := ExtractFileName(ExpandConstant('{srcexe}')); MsgBox(SetupName, mbInformation, MB_OK); Result := False; end; 

{srcexe}

 The full pathname of the Setup program file, eg "C:\SETUP.EXE". 

Additional Information about Inno Installation Constants

+6
source

Source: https://habr.com/ru/post/1481110/


All Articles