How to use placeholder like {app} or {temp} in Inno Setup script?

前端 未结 2 1440
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 06:48

How can I access (directory) constants from Inno Setup script code ?

I have tried the following without success:



        
相关标签:
2条回答
  • 2021-01-14 07:10

    Use the ExpandConstant function to expand any of the constants value:

    function dbExistis: Boolean;
    begin
      Result := FileExists(ExpandConstant('{commonappdata}\LR-International\DB_LR.IB'));
    end;
    
    0 讨论(0)
  • 2021-01-14 07:16

    Use ExpandConstant function

    function dbExistis() : Boolean;
      begin
        Result := FileExists(ExpandConstant('{commonappdata}') + '\LR-International\DB_LR.IB');
      end;
    
    0 讨论(0)
提交回复
热议问题