首页 > 技术文章 > 在安装程序之前,预先安装别的程序

liujx2019 2019-01-23 10:42 原文

写在下面的函数里

procedure CurStepChanged(CurStep: TSetupStep);

 

 

if_need_vc_x64 := NeedInstallVC8SP1_x64();
 if (CurStep=ssInstall) and (if_need_vc_x64) then begin
  ExtractTemporaryFile('vc_redist.x64.exe');
  Exec(ExpandConstant('{tmp}/vc_redist.x64.exe'), '/qb', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
  if not (ResultCode = 0) 
  then begin
    MsgBox('VC++ 2015 Redistributable which is mandatory!',mbCriticalError, MB_OK)      
  end;

 end;

 

推荐阅读