如何在Inno Setup脚本中使用{app}或{temp}等占位符?

Chr*_*ohr 3 inno-setup

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

我试过以下没有成功:

function dbExistis() : Boolean;
begin
  Result := FileExists({commonappdata} + '\LR-International\DB_LR.IB');
end;
Run Code Online (Sandbox Code Playgroud)

TLa*_*ama 5

使用该ExpandConstant函数展开任何常量值:

function dbExistis: Boolean;
begin
  Result := FileExists(ExpandConstant('{commonappdata}\LR-International\DB_LR.IB'));
end;
Run Code Online (Sandbox Code Playgroud)