Kawaii-Hachii
Kawaii-Hachii

Reputation: 1061

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.

Upvotes: 13

Views: 10494

Answers (2)

Andreas Rejbrand
Andreas Rejbrand

Reputation: 109003

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}');

Upvotes: 20

mirtheil
mirtheil

Reputation: 9192

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

Upvotes: 26

Related Questions