System Delphi

function GetWinVersion: string;
begin
result:='Unknown OS Version';
case Win32Platform of
1: begin // 9x-Reihe
if Win32MajorVersion=4 then begin
if Win32MinorVersion=0 then result:='Windows 95'
else if Win32MinorVersion=10 then result:='Windows 98'
else if Win32MinorVersion=90 then result:='Windows Me';
end;
end;
2: begin // NT-Reihe
if (Win32MajorVersion=3) and (Win32MinorVersion=51) then result:='Windows NT 3.51'
else if (Win32MajorVersion=4) and (Win32MinorVersion=0) then result:='Windows NT 4'
else if Win32MajorVersion=5 then begin
if Win32MinorVersion=0 then result:='Windows 2000'
else if Win32MinorVersion=1 then result:='Windows XP'
else if Win32MinorVersion=2 then result:='Windows .NET Server';
end;
end;
end;
//Win32CSDVersion enthält Informationen zu Servicepacks
if Win32CSDVersion<>'' then result:=result+' + ['+Win32CSDVersion+']';
end;