我在脚本中添加了以下代码:
[Code]
function IsSomeAppInstalled: Boolean;
begin
Result := FileExists(ExpandConstant('{pf32}\SomeApp\Some.dll'));
end;
function InitializeSetup(): Boolean;
begin
Boolean bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)), mbInformation, MB_OK);
Result := true;
end;
行
Boolean bIsInstalled := IsSomeAppInstalled();
引发错误
内部错误(20)
这里可能是什么错误?
答案 0 :(得分:4)
在Pascal(脚本)中,您declare variables using var
keyword在实际代码之前:
function InitializeSetup(): Boolean;
var
bIsInstalled: Boolean;
begin
bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)), mbInformation, MB_OK);
Result := true;
end;