[Code]
function FileDoesNotExist(file: string): Boolean;
begin
if (FileExists(file)) then
begin
Result := False;
end
else
begin
Result := True;
end;
end;
function InitializeSetup(): Boolean;
begin
Result:= true;
if FileDoesNotExist('wc2.db') then
begin
MsgBox('文件1不存在',mbConfirmation,MB_OK);
Result:=false;
end
else if FileDoesNotExist('config\1.txt') then
begin
MsgBox('文件2不存在',mbConfirmation,MB_OK);
Result:=false;
end
else if FileDoesNotExist('config\2.txt') then
begin
MsgBox('文件2不存在',mbConfirmation,MB_OK);
Result:=false;
end
else
begin
Result:=true;
end
end;