简体   繁体   English

NSIS - 如何获取安装程序可执行文件的文件名?

[英]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: 我找到了两种在NSIS脚本中获取安装程序文件完整路径的方法:

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

But I need only the filename, and not the complete path. 但我只需要文件名,而不是完整的路径。 How go get it? 怎么去了? Is there an ExtractFileName() type function? 是否有ExtractFileName()类型函数?

$EXEFILE is what you want. $EXEFILE就是你想要的。 It'll be of the form foo.exe . 它将是foo.exe的形式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM