Skip to content

Commit

Permalink
Add ability for qz-tray.exe or qz-tray-console.exe to wait for return…
Browse files Browse the repository at this point in the history
… code
  • Loading branch information
tresf committed Sep 1, 2021
1 parent ab945ae commit e30adf2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ant/windows/windows-launcher.nsi.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,18 @@ Section
StrCpy $command '"$R2" /s /k "$command"'
${EndIf}

Exec $command
; Allow return of exit code
${StrLoc} $R2 $params "--wait" "<"
${If} $R2 != ""
; Switch from /k to /c to capture exit code from -console.exe
${StrRep} $command "$command" " /k " " /c "
ExecWait $command $R3
; Set error-level
SetErrorLevel $R3
${Else}
Exec $command
${EndIf}

${If} ${RunningX64}
${EnableX64FSRedirection}
${EndIf}
Expand Down

0 comments on commit e30adf2

Please sign in to comment.