[英]Get FileName of setup.exe File
how do i get the Exe-Name of the setup file itself? 我如何获取安装文件本身的Exe名称?
I want to get the exe filename itself written to a variable in the inno setup script. 我想将exe文件名本身写入inno安装脚本中的变量中。
Inno Setup version 5.5.3 Inno Setup版本5.5.3
You can extract your setup exe name from constant {srcexe}
and write is as custom Variable String. 您可以从常量
{srcexe}
提取设置exe名称,并以自定义变量字符串形式写入。
Example: 例:
ExtractFileName(ExpandConstant('{srcexe}'))
In Code: 在代码中:
[Code]
function InitializeSetup: Boolean;
var
SetupName : String;
begin
SetupName := ExtractFileName(ExpandConstant('{srcexe}'));
MsgBox(SetupName, mbInformation, MB_OK);
Result := False;
end;
{srcexe}
{srcexe}
The full pathname of the Setup program file, eg "C:\\SETUP.EXE".
More info about Inno Setup's Constants 有关Inno Setup常量的更多信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.