gnatix |
2016-06-08 04:25 |
[Code] function NextButtonClick(CurPageID: Integer): Boolean; var s: AnsiString; begin Result := true; if CurPageID = wpSelectDir then begin Result:= false; if FileExists(ExpandConstant('{app}\123.txt')) then // 检查文件 123.txt 是否存在 if LoadStringFromFile(ExpandConstant('{app}\123.txt'), s) then // 读取文件内容 if Pos('123', s) > 0 then // 检查文件里面是否包含字符串 "123" Result := true; if Result = false then begin MsgBox('安装条件不满足,将退出安装。', mbInformation, MB_OK); Application.Terminate; // 不满足条件时退出安装 end; end; end; |
|