Inno setup 如何在Inno安装脚本中使用像{app}或{temp}这样的占位符?

Inno setup 如何在Inno安装脚本中使用像{app}或{temp}这样的占位符?,inno-setup,Inno Setup,如何从Inno安装脚本代码访问(目录)常量 我尝试了以下方法,但没有成功: 函数dbExistis():布尔值; 开始 结果:=FileExists({commonappdata}+'\LR International\DB_LR.IB'); 结束; 使用函数展开任何常量值: 函数dbExistis:Boolean; 开始 结果:=FileExists(ExpandConstant('{commonappdata}\LR International\DB_LR.IB')); 结束; 使用 函数d

如何从Inno安装脚本代码访问(目录)常量

我尝试了以下方法,但没有成功:

函数dbExistis():布尔值;
开始
结果:=FileExists({commonappdata}+'\LR International\DB_LR.IB');
结束;
使用函数展开任何常量值:

函数dbExistis:Boolean;
开始
结果:=FileExists(ExpandConstant('{commonappdata}\LR International\DB_LR.IB'));
结束;
使用

函数dbExistis():布尔值;
开始
结果:=FileExists(ExpandConstant({commonappdata}')+'\LR International\DB_LR.IB');
结束;

最好在
ExpandConstant()
调用中包含完整路径,因为它处理添加字符和可能重复的``字符。不客气!无论如何,按照我在这篇文章中所展示的完整路径展开,而不是像公认的答案那样只展开常量部分。