27

Is there an NSIS var to get the path of the currently running installer?

Jay R.
  • 31,911
  • 17
  • 52
  • 61
Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636

2 Answers2

32

Found it: $EXEPATH

Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636
14

There are few useful variables:

  • $EXEPATH - holds installer filename.
  • $EXEDIR - holds the complete path to the installer.

So according to the topic

NSIS get path of current installer file that is running

the most appropriate is $EXEDIR.

Maxim Suslov
  • 4,335
  • 1
  • 35
  • 29
  • 1
    $EXEPATH is the complete path to the installer including the filename. $EXEDIR is only the directory where the the installer file resides. $EXEFILE is the base filename of the installer name, e.g. "myinstaller.exe" – Fotios Basagiannis Feb 01 '21 at 03:54