[Inno Setup] 对比字符串

[Code]
var
  MD5Comp: string;

procedure ExitProcess(uExitCode:UINT);
  external 'ExitProcess@kernel32.dll stdcall';

procedure CurStepChanged(CurStep: TSetupStep);
begin
  MD5Comp := '32297BCBF4D802298349D06AF5E28059';

  if CurStep = ssInstall then
  begin

   if MD5Comp <> GetMD5OfFile(ExpandConstant('{app}cg.npa')) then
   begin
     MsgBox('A patched version detected. Setup will now exit.', mbInformation, MB_OK);
     ExitProcess(1);
   end;
  end;
end;
原文地址:https://www.cnblogs.com/liujx2019/p/10531784.html