diff options
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r-- | src/Common/Dlgcode.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index ee3630c0..681761bf 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -1045,8 +1045,22 @@ BOOL IsOSVersionAtLeast (OSVersionEnum reqMinOS, int reqMinServicePack) return ((CurrentOSMajor << 16 | CurrentOSMinor << 8 | CurrentOSServicePack) >= (major << 16 | minor << 8 | reqMinServicePack)); } +BOOL IsWin10BuildAtLeast(DWORD minBuild) +{ + // Must first be recognized as Windows 10 or higher + if (nCurrentOS < WIN_10) + return FALSE; + + // If we’re on Windows 10, check build number + if (nCurrentOS == WIN_10 && CurrentOSBuildNumber < minBuild) + return FALSE; + + // If we are on a higher version of Windows, we are good to go + return TRUE; +} + #ifdef SETUP_DLL static BOOL GetWindowVersionFromFile(DWORD* pdwMajor, DWORD* pdwMinor, DWORD* pdwBuildNumber) { wchar_t dllPath[MAX_PATH]; @@ -3610,12 +3624,12 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine) INITCOMMONCONTROLSEX InitCtrls; InitOSVersionInfo(); - if (!IsOSAtLeast (WIN_10)) + if (!IsWin10BuildAtLeast(WIN_10_1809_BUILD)) { - // abort using a message that says that VeraCrypt can run only on Windows 10 and later - AbortProcessDirect(L"VeraCrypt requires at least Windows 10 to run."); + // abort using a message that says that VeraCrypt can run only on Windows 10 version 1809 or later + AbortProcessDirect(L"VeraCrypt requires at least Windows 10 version 1809 (October 2018 Update) to run."); } if (!Is64BitOs()) { |