mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user