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
Run Windows Command Prompt (cmd) (in Windows 10: open the Start menu, type cmd and press Enter) and go to the folder where your EXE file is located. replace <file.exe> with the name of your .exe file and <target-folder> with the path to the folder where you want the . msi file to be extracted (for example C:\Folder).
Expand your Project, In Project expand Prepare for Releases, you will see an option Releases, Double click above option, new window will opened, in left pane click on Express, In right pane under General tab you will see Setup File Name, change this and you are done.
When you open the EXE file in 7-Zip, you'll be shown a list of files and folders that the EXE file contains. You can double-click folders to see the files stored inside. You can select multiple files by holding Ctrl and clicking each one. Click the "Extract" button after selecting the files.
Setup.exe is a software file commonly found on the Windows operating systems. It is a .exe type file, meaning that it is executable. This file is commonly used by software programs for installations and used by your operating system to run critical components.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With