Search code examples
windowsinstallationnsis

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


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.


Solution

  • Take a look at the constants, $EXEFILE is the filename, or $EXEPATH for the full path. If you want the name attribute you used in your source file, it is $(^Name)...