Casady
Casady

Reputation: 1456

NSIS - how to get the filename of the installer executable?

I've found two ways of getting the complete path of the installer file in a NSIS script:

  1. System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
  2. Using $EXEPATH (2.26+)

But I need only the filename, and not the complete path. How go get it? Is there an ExtractFileName() type function?

Upvotes: 1

Views: 1440

Answers (1)

Chris Morgan
Chris Morgan

Reputation: 90902

$EXEFILE is what you want. It'll be of the form foo.exe.

Upvotes: 4

Related Questions