From e362d804b0a9e92b36f3e2d28d08bbbc387ac9a2 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 28 Sep 2016 10:55:53 +0200 Subject: Windows: Perform Shutdown instead of Reboot during Pre-Test of UEFI system encryption in order to detect machines where changes to EFI boot don't persist after shutdown. --- src/Common/Dlgcode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Common/Dlgcode.c') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index c2e15390..810b6e8a 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -10017,7 +10017,7 @@ BOOL EnableWow64FsRedirection (BOOL enable) } -BOOL RestartComputer (void) +BOOL RestartComputer (BOOL bShutdown) { TOKEN_PRIVILEGES tokenPrivil; HANDLE hTkn; @@ -10038,7 +10038,7 @@ BOOL RestartComputer (void) return false; } - if (!ExitWindowsEx (EWX_REBOOT, + if (!ExitWindowsEx (bShutdown? EWX_POWEROFF: EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED)) { CloseHandle(hTkn); -- cgit v1.2.3