I'm trying to use VersionHelper API's (https://learn.microsoft.com/en-us/windows/desktop/SysInfo/version-helper-apis) in a CustomAction defined in a dll. My bootstrapper as well as the dll has manifest with supportedOs guid for Windows 10 as well as Windows 8.1
While invoking the installer on windows 2016 server, the version helper function IsWindows10OrGreater() is returning false and IsWindows8Point1OrGreater() is returning true.
This is causing the custom action to detect the OS as windows 2012R2 server. How do I detect Windows 2016 / Windows 10 from within a Custom Action inside a dll.
NB: GetVersionEx() is not an option as I'm trying to migrate from it since MSFT may remove support for the API without notice. (https://learn.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getversionexa)