Skip to content
⌘ NSIS Forum Archive

rename file with the name of installer name in NSIS installer?

2 posts

eastidea#

rename file with the name of installer name in NSIS installer?

Hello ,
I'm working with NSIS installer I need to change file defined in install path to the same installer name

I try to use rename function like :


Rename "$INSTDIR\app.exe" "$INSTDIR\installname.exe"
but I need the installer name automatic
MSG#
If with 'installer name' you mean the name you set with the 'name' command, then simply use this:
Rename "$INSTDIR\app.exe" "$INSTDIR\$(^Name).exe"

Or, faster:
File "/oname=$INSTDIR\$(^Name).exe" app.exe


If by name you mean the actual filename of the installer, you can use $EXEFILE instead of $(^Name) .