mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-24 12:03:28 +01: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:
parent
3bad079d75
commit
e362d804b0
@ -4568,8 +4568,8 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
|
||||
bool BootEncryption::RestartComputer (void)
|
||||
bool BootEncryption::RestartComputer (BOOL bShutdown)
|
||||
{
|
||||
return (::RestartComputer() != FALSE);
|
||||
return (::RestartComputer(bShutdown) != FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ namespace VeraCrypt
|
||||
void RegisterSystemFavoritesService (BOOL registerService, BOOL noFileHandling);
|
||||
void UpdateSystemFavoritesService ();
|
||||
void RenameDeprecatedSystemLoaderBackup ();
|
||||
bool RestartComputer (void);
|
||||
bool RestartComputer (BOOL bShutdown = FALSE);
|
||||
void InitialSecurityChecksForHiddenOS ();
|
||||
void RestrictPagingFilesToSystemPartition ();
|
||||
void SetDriverConfigurationFlag (uint32 flag, bool state);
|
||||
|
@ -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);
|
||||
|
@ -443,7 +443,7 @@ BOOL Is64BitOs ();
|
||||
BOOL IsServerOS ();
|
||||
BOOL IsHiddenOSRunning (void);
|
||||
BOOL EnableWow64FsRedirection (BOOL enable);
|
||||
BOOL RestartComputer (void);
|
||||
BOOL RestartComputer (BOOL bShutdown);
|
||||
void Applink (char *dest, BOOL bSendOS, char *extraOutput);
|
||||
wchar_t *RelativePath2Absolute (wchar_t *szFileName);
|
||||
void HandleDriveNotReadyError (HWND hwnd);
|
||||
|
@ -8157,7 +8157,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
try
|
||||
{
|
||||
BootEncObj->RestartComputer ();
|
||||
BootEncObj->RestartComputer (bSystemIsGPT);
|
||||
}
|
||||
catch (Exception &e)
|
||||
{
|
||||
@ -10112,7 +10112,7 @@ static void AfterWMInitTasks (HWND hwndDlg)
|
||||
|
||||
try
|
||||
{
|
||||
BootEncObj->RestartComputer ();
|
||||
BootEncObj->RestartComputer (bSystemIsGPT);
|
||||
}
|
||||
catch (Exception &e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user