简体   繁体   English

获取setup.exe文件的文件名

[英]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.

相关问题 运行由Inno Setup创建的Setup.exe并获取“ ...'“ isxdl.dll'未找到。”错误 - Running Setup.exe created by Inno Setup and get “… '”isxdl.dll' was not found." error Inno Setup运行setup.exe时修改app.config文件 - Inno Setup Modify app.config file when you run setup.exe 使用Inno-Setup将特定任务的文件编译为其他安装文件(setup.exe,files.bin)? - Compile files of specific task to an additional setup file (setup.exe, files.bin) using Inno-Setup? Inno Setup-Setup.exe在本地运行,但不能下载 - Inno Setup - Setup.exe works locally, but not as a download Inno Setup设置Setup.exe的创建日期和修改日期相同 - Inno Setup set Setup.exe create date and modified date the same 使用 inno.setup 创建 setup.exe 后拒绝访问目录和文件 - Access to directory & files denided after creating setup.exe with inno.setup 如何将执行setup.exe(来自INNO 5.5.4)时选择的语言保存到Windows注册表? - How to save to Windows registry the language chosen when setup.exe (from INNO 5.5.4) is executed? 在Windows XP上,inno setup.exe失败,浮点除零 - inno setup.exe fails with Floating point division by zero on Windows XP InnoSetup - 如何使setup.exe成为875kB? 这样用户可以更快地下载它并在下载时下载另一个? - InnoSetup - how to make setup.exe into 875kB? So that users download it faster and on download it will download another one? 如何获取包含在 inno setup installer exe 文件中的文件版本(exe 和 dll)? - How to get versions of files (exe's and dll's) which are included to inno setup installer exe file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM