File path to exe.

31 views
Skip to first unread message

Douglas Rudd

unread,
Jun 1, 2026, 11:37:27 PM (4 days ago) Jun 1
to innosetup
I'm making a procedure in the [Code] section. I need to get the file path of the setup exe the user started.

If I try
filename:=paramstr(0);
, it gives me some tmp file in some obscure folder which has the wrong file size.

Is there a way to get the file path of the actual setup exe the user started on the hard drive?

Martijn Laan

unread,
Jun 1, 2026, 11:40:26 PM (4 days ago) Jun 1
to innosetup
Yes: ExpandConstant('{srcexe}')

Greetings,
Martijn

-------- Original Message --------
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/3aceba3a-bac6-41fe-89ea-bfa71bb7440an%40googlegroups.com.

Douglas Rudd

unread,
Jun 2, 2026, 2:50:36 AM (4 days ago) Jun 2
to innosetup
Thanks, that works.

Gavin Lambert

unread,
Jun 2, 2026, 8:05:38 PM (3 days ago) Jun 2
to innosetup
On Tuesday, June 2, 2026 at 3:40:26 PM UTC+12 Martijn Laan wrote:
Yes: ExpandConstant('{srcexe}')

Or just {src} if you want the directory rather than the full pathname. 
Reply all
Reply to author
Forward
0 new messages