Irfan Mulic
Irfan Mulic

Reputation: 1206

How to get path where is temporary Inno setup file is located

I have a DLL that I am calling from Inno setup script, dll is looking to load some file from the path where executable is located.

In my case when I execute the setup, temporary executable is exported in temp folder is-xxxxx

BTW, {tmp} is not the right one. It is another tmp folder but not the one that temporary setup.

I need to know that in inno setup is there a constant to represent that folder.

Thanks.

Upvotes: 0

Views: 2063

Answers (2)

AZ.
AZ.

Reputation: 7573

How about this

path := ExpandConstant('{src}');

Upvotes: 0

Robert Love
Robert Love

Reputation: 12581

Your DLL can determine which path it's been extracted to and it can also determine the path of the temporary executable. The way you do it depends on the language your DLL is written in.

But the Key Windows API call is GetModuleFileName

If your DLL was written in Delphi you could use the following to get the path of Setup.exe

ExtractFilePath(ParamStr(0))

Upvotes: 2

Related Questions