如何在Inno Setup中获取安装程序路径?

Kaw*_*hii 12 installation installer inno-setup path

您是否知道在Inno Setup中获取安装程序路径的正确方法?

我希望在该[Code]部分内捕获该值.

mir*_*eil 23

{srcexe}将为您提供设置的路径和文件名.
{src}将为您提供安装程序路径.


And*_*and 18

你应该使用{srcexe} 常量.在Pascal脚本中,您可以使用ExpandConstant函数获取常量的值,如

path := ExpandConstant('{srcexe}');
Run Code Online (Sandbox Code Playgroud)

  • @ewlung:您应该通过单击答案左侧的复选标记来接受其中一个答案. (4认同)