diff --git a/CodeDependencies.iss b/CodeDependencies.iss index 99c7bf4..07f5d22 100644 --- a/CodeDependencies.iss +++ b/CodeDependencies.iss @@ -54,6 +54,18 @@ begin Dependency_List[DependencyCount] := Dependency; end; +function Dependency_Execute(const Filename, Parameters: String; var ResultCode : Integer): Boolean; +var + Handled: Boolean; +begin + Handled := False; + #ifdef Dependency_CustomExecute + Result := {#Dependency_CustomExecute}(Filename, Parameters, ResultCode, Handled); + #endif + if not Handled then + Result := ShellExec('', Filename, Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); +end; + procedure Dependency_Internal1; begin @@ -110,7 +122,7 @@ begin while True do begin ResultCode := 0; - if ShellExec('', ExpandConstant('{tmp}{\}') + Dependency_List[DependencyIndex].Filename, Dependency_List[DependencyIndex].Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then begin + if Dependency_Execute(ExpandConstant('{tmp}{\}') + Dependency_List[DependencyIndex].Filename, Dependency_List[DependencyIndex].Parameters, ResultCode) then begin if Dependency_List[DependencyIndex].RestartAfter then begin if DependencyIndex = DependencyCount - 1 then begin Dependency_NeedRestart := True;