在安装程序之前,预先安装别的程序

写在下面的函数里

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;

 

posted on 2019-01-23 10:42  liujx2019  阅读(406)  评论(0)    收藏  举报

导航