[Installer] Test the error flag with LogicLib's ${Errors} condition

makensis rejected the script with "macro _If requires 4 parameter(s), passed
2" at the ClearErrors/OpenProcess pair. A ${If} condition cannot be a bare
$Var: LogicLib needs either a comparison or one of its flag macros, and a lone
$Errors splits into too few arguments for _If. ${Errors} is the documented flag
condition and is the same mechanism as the ${Silent} test already used here.

The dump step earned its keep - this took one run to locate rather than another
round of guessing.
This commit is contained in:
Lukas Brübach 2026-10-02 04:36:11 +02:00
parent 4c911df257
commit 43c6ec973c

View file

@ -518,9 +518,9 @@ Function WaitForLauncherToExit
; do with the upgrade.
ClearErrors
System::Call 'kernel32::OpenProcess(i 0x00100000, i 0, i $WaitPid) p.r0'
${If} $Errors
; The launcher is gone - OpenProcess cannot open a dead process - which is
; exactly the state the wait was for.
${If} ${Errors}
; The launcher is gone - OpenProcess cannot open a dead process - which is
; exactly the state the wait was for.
DetailPrint "The application that started this installer has already exited."
StrCpy $LauncherExited 1
Return