我在脚本中添加了以下代码:
[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)
这可能是什么错误?
在Pascal(脚本)中,您可以在实际代码之前使用var
关键字声明变量:
function InitializeSetup(): Boolean;
var
bIsInstalled: Boolean;
begin
bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)), mbInformation, MB_OK);
Result := true;
end;
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句