Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get FileName of setup.exe File

Tags:

inno-setup

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

like image 365
Bob Avatar asked May 16 '13 07:05

Bob


People also ask

How do I extract setup files?

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).

How do I change setup EXE to other name Installshield?

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.

How do I unpack an EXE file?

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.

What is setup EXE file?

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.


Video Answer


1 Answers

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

like image 133
RobeN Avatar answered Sep 22 '22 12:09

RobeN