Skip to content
⌘ NSIS Forum Archive

Is anyway to get the installer name at run time?

4 posts

deroel#

Is anyway to get the installer name at run time?

Is anyway to get the installer name at run time?

I'm trying to read the installer game.

I have a code like this


FileOpen $R1 "$EXEDIR\My_INSTALLERSetup.exe" r

The problem is when you have more than one file with the same name. When you download the new installer, system usually rename the new file to My_INSTALLERSetup-1.exe

Is the installer name saved in any variable? like $EXEDIR?

Thanks!!
Takhir#
System plug-in calls work without 'A' in the last NSIS versions

Section
System::Call 'kernel32::GetModuleFileName(i 0, t .r0, i 1024) i r2'
System::Call 'kernel32::GetLongPathName(t r0, t .r1, i 1024)i .r2'
MessageBox MB_OK $1
SectionEnd