From 8afc9e18407f1cc2331a6f55c612a755b30adff9 Mon Sep 17 00:00:00 2001 From: Vichingo455 Date: Thu, 29 May 2025 15:29:45 +0200 Subject: [PATCH] More bug fixes --- setup/RunOnce.nsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/setup/RunOnce.nsh b/setup/RunOnce.nsh index 3472312..8ab107a 100644 --- a/setup/RunOnce.nsh +++ b/setup/RunOnce.nsh @@ -18,8 +18,9 @@ System::Call '${GetUserName}(.r0, ${NSIS_MAX_STRLEN}) .r1' ${If} ${IsRunOnce} ${AndIf} $0 == "SYSTEM" - ; Running in setup mode. Reboot is mandatory. - Reboot + ; Running in setup mode + SetErrorLevel ${ERROR_SUCCESS} + Quit ${Else} ; Regular reboot. Reboot @@ -257,6 +258,12 @@ Function OnRunOnceDone ${If} $0 == "SYSTEM" ; Configure winlogon to proceed to the logon dialog Call CleanUpRunOnce + ; Reboot + ${DetailPrint} "$(StatusRestarting)" + Sleep 2000 + Reboot + ; Just to be sure + Sleep 10000 ${EndIf} ${EndIf} FunctionEnd