I am using this code to detect the WindowsVersion on a PC.
function GetOS: string;
var
osVerInfo: TOSVersionInfo;
majorVer, minorVer: Integer;
begin
Result := 'Unknown';
osVerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
if GetVersionEx(osVerInfo) then
begin
majorVer := osVerInfo.dwMajorVersion;
minorVer := osVerInfo.dwMinorVersion;
case osVerInfo.dwPlatformId of
VER_PLATFORM_WIN32_NT: {Mirosoft Windows NT/2000 }
begin
if majorVer <= 4 then
Result := 'Win NT'
else if (majorVer = 5) and (minorVer = 0) then
Result := 'Win 2k'
else if (majorVer = 5) and (minorVer = 1) then
Result := 'Win XP'
else if (majorVer = 6) and (minorVer = 0) then
Result := 'Win Vista'
else if (majorVer = 6) and (minorVer = 1) then
Result := 'Win 7'
else if (majorVer = 6) and (minorVer = 2) then
Result := 'Win 8'
end;
VER_PLATFORM_WIN32_WINDOWS: { Windows 9x/ME }
begin
if (majorVer = 4) and (minorVer = 0) then
Result := 'Win 95'
else if (majorVer = 4) and (minorVer = 10) then
begin
if osVerInfo.szCSDVersion[1] = 'A' then
Result := 'Win 98SE'
else
Result := 'Win 98';
end
else if (majorVer = 4) and (minorVer = 90) then
Result := 'Win ME'
end;
end;
end;
end;
For some reason it says that Windows8 Consumer Preview Build 8250 (32bit) is Windows XP - Major Version 5. I checked and it's supposed to be Version 6.2 (according to notepad.exe on windows8) Is this a bug or is something wrong? btw. my Windows 8 is up2date.
Any Ideas?
EDIT: ScreenShot
The Windows 8 Consumer Preview is just that: a preview of what’s to come. It represents a work in progress, and some things will change before the final release. This means you’ll encounter some hiccups and bugs.
Before you start the download, there are a few things to keep in mind. The Windows 8 Consumer Preview is just that: a preview of what’s to come. It represents a work in progress, and some things will change before the final release. This means you’ll encounter some hiccups and bugs.
Advanced embedding details, examples, and help ! The Windows 8 Consumer Preview. Subject: . Build number of this is 8250. You don't need to set a BIOS Date, because timebomb is broken.
The reason for this behavior is XP Compatibility mode, Delphi 7 IDE was running under compatibility mode.
For Windows 8.0 the version 6.2 is correct - also the Build-Number. With Windows 8.1 you get version 6.2 too. But now the Version-Number ist 6.3 Build 9600. You can see it in the system-info. GetVersionEx allows only 0,1,2 for Win32MinorVersion. If you need this info, you can read it from registry-key 'Version' in HKCU\Software\Microsoft\Internet Explorer\Main\WindowsSearch. Best regards, asks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With