论坛风格切换切换到宽版
  • 3664阅读
  • 1回复

虎哥,识别 [复制链接]

上一主题 下一主题
离线syl1130
 

发帖
81
金钱
510
威望
71
只看楼主 倒序阅读 0 发表于: 2016-06-07
虎哥,
您好。有一个问题不知道怎么弄?



本帖提到的人: @gnatix
离线gnatix

发帖
7696
金钱
-8279
威望
-828
只看该作者 1 发表于: 2016-06-08
[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;