Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the installer path in Inno Setup?

Do you know the right method to get the installer path in Inno Setup?

I want to catch that value inside the [Code] section.

like image 530
Kawaii-Hachii Avatar asked Mar 14 '11 23:03

Kawaii-Hachii


People also ask

What is an Inno Setup file?

Inno Setup is a free software script-driven installation system created in Delphi by Jordan Russell. The first version was released in 1997. Inno Setup. Screenshot of the Inno Setup IDE running on Windows 7. Developer(s)


2 Answers

{srcexe} will give you the path and filename of the setup.
{src} will give you just the installer path.

like image 169
mirtheil Avatar answered Oct 22 '22 13:10

mirtheil


You should use the {srcexe} constant. In Pascal scripting, you can obtain the values of constants using the ExpandConstant function, as in

path := ExpandConstant('{srcexe}');
like image 23
Andreas Rejbrand Avatar answered Oct 22 '22 12:10

Andreas Rejbrand