Hola,
Puedes adaptarlo a tus necesidades... si es que ves que puede serte útil algo así, claro está:
Código Delphi
[-]
const
WIN_31 = 'Win31';
WIN_95 = 'Win95';
WIN_98 = 'Win98';
WIN_ME = 'WinME';
WIN_NT3 = 'WinNT3';
WIN_NT4 = 'WinNT4';
WIN_2K = 'Win2K';
WIN_XP = 'WinXP';
WIN_VISTA = 'WinVista';
WIN_DESC = 'WinDesconocido';
function VersionWindows(): string;
var
OSVer: TOSVersionInfo;
Major, Minor: cardinal;
begin
result := WIN_DESC;
OSVer.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
if GetVersionEx(OSVer) then
begin
Major := OSVer.dwMajorVersion;
Minor := OSVer.dwMinorVersion;
case OSVer.dwPlatformId of
VER_PLATFORM_WIN32S: Result := WIN_31;
VER_PLATFORM_WIN32_WINDOWS:
begin
case Minor of
0..3: result := WIN_95;
10: result := WIN_98;
90: result := WIN_ME;
end;
end;
VER_PLATFORM_WIN32_NT:
begin
case Major of
3: result := WIN_NT3;
4: result := WIN_NT4;
5:
begin
case Minor of
0: result := WIN_2K;
1: result := WIN_XP;
end;
end;
6: result := WIN_VISTA;
end;
end;
end;
end;
end;