Windows: Block installation of MSI on Windows version older than Windows 10 because of driver code signing

This commit is contained in:
Mounir IDRASSI 2021-11-21 20:53:51 +01:00
parent 3a28821b1d
commit 34282e9fce
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F

View File

@ -2249,6 +2249,14 @@ BOOL InitDll (MSIHANDLE hInstaller)
SetUnhandledExceptionFilter (ExceptionHandler);
_set_invalid_parameter_handler (InvalidParameterHandler);
RemoteSession = GetSystemMetrics (SM_REMOTESESSION) != 0;
// OS version check: from version 1.25, only Windows XP, Windows 10 and Windows 11 are supported because of new driver signing requirements
if (!IsOSVersionAtLeast(WIN_10, 0))
{
MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("UNSUPPORTED_OS"));
bOK = FALSE;
goto end;
}
end:
MSILog(hInstaller, MSI_INFO_LEVEL, L"End InitDll");