Advertisement
GordCaswell

VistaSwitcherPortableCustom

Nov 30th, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ${SegmentFile}
  2.  
  3.  
  4. ${OverrideExecute}
  5.     ${DebugMsg} "About to execute the following string and wait till it's done: $ExecString"
  6.     ${EmptyWorkingSet}
  7.     ClearErrors
  8.     ExecShell "" $ExecString
  9.     ${DebugMsg} "$ExecString has finished."
  10.  
  11.     ; Wait till it's done
  12.     ClearErrors
  13.     ${GetFileName} $ProgramExecutable $1
  14.     ${DebugMsg} "Waiting till any other instances of $1 and any [Launch]:WaitForEXE[N] values are finished."
  15.     ${EmptyWorkingSet}
  16.     ${Do}
  17.         ${ProcessWaitClose} $1 -1 $R9
  18.         ${IfThen} $R9 > 0 ${|} ${Continue} ${|}
  19.         StrCpy $0 1
  20.         ${Do}
  21.             ClearErrors
  22.             ${ReadLauncherConfig} $2 Launch WaitForEXE$0
  23.             ${IfThen} ${Errors} ${|} ${ExitDo} ${|}
  24.             ${ProcessWaitClose} $2 -1 $R9
  25.             ${IfThen} $R9 > 0 ${|} ${ExitDo} ${|}
  26.             IntOp $0 $0 + 1
  27.         ${Loop}
  28.     ${LoopWhile} $R9 > 0
  29.     ${DebugMsg} "All instances are finished."
  30. !macroend
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement