Voila, j'ai un vieux source mais il est pas à jour, je voudrai détecter Windows 2000 Professionnel voir XP aussi en plus de ce qu'il fait.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  var
    Form1: TForm1;
    OSVersionInfo: TOSVersionInfo;
 
    const S = 'Votre Système d''exploitation est : ';
 
  implementation
 
  {$R *.DFM}
 
  procedure TForm1.Button1Click(Sender: TObject);
  begin
 
    OSVersionInfo.dwOSVersionInfoSize:= SizeOf(OSVersionInfo);
    GetVersionEx(OSVersionInfo);
 
    case OSVersionInfo.dwPlatformID of
 
         VER_PLATFORM_WIN32s        :    Label1.Caption := S + 'Windows 3.1';
         VER_PLATFORM_WIN32_WINDOWS : if OSVersionInfo.dwMinorVersion = 0 then
                                         Label1.Caption := S + 'Windows 95'
                                      else
                                         Label1.Caption := S + 'Windows 98';
         VER_PLATFORM_WIN32_NT      :    Label1.Caption := S + 'Windows NT';
                                      else
                                         Label1.Caption := 'Système d''exploitation inconnu.';
 
    end;
 
  end;

Merci de votre aide.