Page 1 of 1

Unsupported Windows Version

Posted: Wed May 03, 2023 1:01 pm
by thefunkyjoint
Hi,

I'm on the latest Cef4Delphi build. I know recent CEF versions only runs on Win 10 or later.

But one of my customers indeed has Windows 10 installed and is receiving this error :

Unsupported Windows Version !
Chromium requires Windows 10 or later

Why ?

Re: Unsupported Windows Version

Posted: Wed May 03, 2023 1:03 pm
by thefunkyjoint
When calling winver, i get this version :

Version 21H2 - Compilation 19044.2846

Re: Unsupported Windows Version

Posted: Wed May 03, 2023 2:31 pm
by salvadordf
Sorry about that issue.
I'll have to find a computer with an outdated Windows 10 version to debug it.
Meanwhile please set GlobalCEFApp.CheckCEFFiles to FALSE to skip the Windows version check.

Re: Unsupported Windows Version

Posted: Wed May 03, 2023 5:49 pm
by thefunkyjoint
If it helps, here is the funcion i use to check if Windows is old (< 10), so far it's been working great :

function Tdf.isOldWin: boolean;
var
w: string;
begin
w := winversion;
Result := (w <> '') and (pos('10', w) = 0) and (pos('11', w) = 0) and (pos('22', w) = 0) and (pos('23', w) = 0);
end;


function Tdf.winversion: string;
var
PlatformId, VersionNumber: string;
Reg: TRegistry;
begin
try
// Detect platform
Reg := TRegistry.create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows NT\CurrentVersion');
PlatformId := Reg.ReadString('ProductName');
if PlatformId = '' then
begin
Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows\CurrentVersion');
PlatformId := Reg.ReadString('ProductName');
end;
Reg.free;
Result := PlatformId;
except
on e: exception do
begin
Result := '';
end;
end;
end;

Re: Unsupported Windows Version

Posted: Tue May 09, 2023 9:27 am
by salvadordf
I could finally find a computer with Windows 10 Version 21H2 - Compilation 19044.2846 and I wasn't able to reproduce this issue.

GetRealWindowsVersion gave the correct values to the aMajor and aMinor parameters. This means that the NetServerGetInfo call failed for a different reason.

I'll keep searching.

Re: Unsupported Windows Version

Posted: Tue Jun 06, 2023 3:55 pm
by wolf
One of our customers reports the same error.

He is running Version 22H2 - OS Build 19045.2965

In our software we use something similar as @thefunkyjoint, we just read
"SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber"
to get the build number which works fine.

Re: Unsupported Windows Version

Posted: Wed Jun 07, 2023 11:09 am
by salvadordf
Hi,

I just uploaded a new CEF4Delphi version that includes your suggestions in the GetRegistryWindowsVersion function.

Thank you !!! :D

Re: Unsupported Windows Version

Posted: Thu Jun 08, 2023 3:36 pm
by wolf
Thanks. This new version works correctly on the customer's PC.