Reputation: 177
how do i get the Exe-Name of the setup file itself?
I want to get the exe filename itself written to a variable in the inno setup script.
Inno Setup version 5.5.3
Upvotes: 6
Views: 2718
Reputation: 5456
You can extract your setup exe name from constant {srcexe}
and write is as 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, e.g. "C:\SETUP.EXE".
More info about Inno Setup's Constants
Upvotes: 8