MariaDB does not support Windows 2012 until October 2023. It was supported until Oct 2018 .
And I am surprised that Ralph did not bring this up before.
MariaDB supports Windows version in their active lifecycle, which means "mainstream", not "extended"
10.5 was released after that. To my knowledge, 10.5 or any later version was not tested by MariaDB people on that specific OS. Not by CI, neither by QA, neither by developers. It might work on this OS, or it might not. Nobody checked.
So whatever the condition says, is strictly speaking, not incorrect.
The Engineering policy has had this "Until the product reaches the Mainstream Support End Date.", specifically for Windows, for many-many years now ( current version https://mariadb.com/wp-content/uploads/2023/03/mariadb-engineering-policies-v4-14-1_policy_1166.pdf has it too, of course).
Mainstream supported for 2012 and 2012 R2 ended on
Oct 9 2018 ( https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2012 )
We should have blocked 2012 R2 too, but the condition for that is trickier, so it did not work
(but MariaDB devs or QA would not know, because it was not tested on R2 either)
Please take a look at the MsiNTProductType property.
Windows 8 x64
VersionNT64 = 602 AND MsiNTProductType = 1
Windows Server 2012 x64
VersionNT64 = 602 AND MsiNTProductType <> 1
I think this will help you solve the problem.