[Inno Setup] 执行程序,返回值不为0时提示用户

 

procedure LoadPerfCounter();
var
  Ret : Integer;
begin
  if Exec(ExpandConstant('{sys}') + '\lodctr.exe',
         '/m:test.man', ExpandConstant('{app}') ,SW_HIDE, ewWaitUntilTerminated, Ret) then
  begin
    if Ret <> 0 then
    begin
      MsgBox('Error when loading performance counters.' + #13#10 + SysErrorMessage(Ret), mbError, MB_OK);
    end;       
  end;
end;

 

posted on 2019-03-13 14:12  liujx2019  阅读(421)  评论(0编辑  收藏  举报

导航