Issue #60: Try to fix non-working RunningOnWindows10S, by passing the current OS version numbers to GetProductInfo()

This commit is contained in:
Ansgar Becker
2018-02-06 20:11:36 +01:00
parent 3c16564271
commit 4cfd36a211

View File

@@ -2873,7 +2873,7 @@ begin
Result := False;
// Avoid crash on WinXP
if Win32MajorVersion >= 6 then begin
if GetProductInfo(10, 10, 0, 0, pdwReturnedProductType) then begin
if GetProductInfo(Win32MajorVersion, Win32MinorVersion, TOSVersion.ServicePackMajor, TOSVersion.ServicePackMinor, pdwReturnedProductType) then begin
Result := (pdwReturnedProductType = PRODUCT_CLOUD) OR (pdwReturnedProductType = PRODUCT_CLOUDN);
end;
end;