IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Delphi Discussion :

Détecter Windows 2000 Professionnel


Sujet :

Delphi

  1. #1
    Inactif  

    Inscrit en
    Mars 2002
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mars 2002
    Messages : 18
    Points : 111
    Points
    111
    Par défaut [résolu]Détecter Windows 2000 Professionnel
    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.
    http://www.egri.co.uk/smileys/walk.gif http://www.developpez.com/delphi/delphihlp.htm
    - Delphi Studio 7 Architecte.
    - Interbase / SQL Server 2000 / Oracle 9i
    - Windows (2000 Famille Server, 98, Me, XP Professionnel).

  2. #2
    psl
    psl est déconnecté
    Membre actif
    Avatar de psl
    Homme Profil pro
    Inscrit en
    Mai 2002
    Messages
    98
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Mai 2002
    Messages : 98
    Points : 242
    Points
    242
    Par défaut
    Salut,
    Peut être des éléments qui te permettront de progresser dans un ancien sujet du forum.
    http://www.developpez.net/forums/viewtopic.php?t=13048
    Ubuntu 18.04 LTS

  3. #3
    Inactif  

    Inscrit en
    Mars 2002
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mars 2002
    Messages : 18
    Points : 111
    Points
    111
    Par défaut
    Slt psl,

    j'ai fais un copie/coller du code suivant, espérant ne pas avoir de mauvaises surprises

    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
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
      function TAnalyseSysteme.WindowsVersion: String;
      begin
      case Win32MajorVersion of
         3:;
         4: case Win32MinorVersion of
              0:  case Win32Platform of
                    1: begin
                        case Win32CSDVersion[length(Win32CSDVersion)-1] of
                          'A': Result := 'Windows 95 SP1';
                          'B': Result := 'Windows 95 SP2';
                         else
                          Result := 'Version CSD INCONNUE';
                        end;
                       end;
                    2: Result := 'Windows NT 4.0'
                   else
                    Result := 'Plate forme INCONNUE';
                  end;
              10: begin
                   case Win32CSDVersion[length(Win32CSDVersion)-1] of
                     'A': Result := 'Windows 98 SP1';
                     'B': Result := 'Windows 98 SP2'
                    else
                     Result := 'CSD Version INCONNUE';
                   end;
                  end;
              90: Result := 'Windows ME';
             else
              Result := 'Minor Version INCONNUE';
            end;
         5: case Win32MinorVersion of
              0: Result := 'Windows 2000';
              1: Result := 'Windows XP'
             else
              Result := 'Minor Version INCONNUE';
            end;
        else
         Result := 'Major Version INCONNUE';
      end;
      end;
    Par contre c'est quoi SP1/SP2 ?
    http://www.egri.co.uk/smileys/walk.gif http://www.developpez.com/delphi/delphihlp.htm
    - Delphi Studio 7 Architecte.
    - Interbase / SQL Server 2000 / Oracle 9i
    - Windows (2000 Famille Server, 98, Me, XP Professionnel).

  4. #4
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juin 2002
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 10
    Points : 5
    Points
    5
    Par défaut
    Par contre c'est quoi SP1/SP2 ?
    il doit falloir comprendre par là OSR2 et non pas SP2
    Metzger, evidement !

  5. #5
    psl
    psl est déconnecté
    Membre actif
    Avatar de psl
    Homme Profil pro
    Inscrit en
    Mai 2002
    Messages
    98
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Mai 2002
    Messages : 98
    Points : 242
    Points
    242
    Par défaut
    Salut,
    Citation Envoyé par metzger
    il doit falloir comprendre par là OSR2 et non pas SP2
    Je ne me rappelle plus de la subtile nuance entre SP1 et SP2 mais celà provenait de la doc Microsoft.
    Si je la retrouce - je t'en ferait part.
    Ubuntu 18.04 LTS

  6. #6
    Expert éminent
    Avatar de Lung
    Profil pro
    Analyste-programmeur
    Inscrit en
    Mai 2002
    Messages
    2 664
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Analyste-programmeur
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2002
    Messages : 2 664
    Points : 6 967
    Points
    6 967
    Par défaut
    C'est pas :
    - 98 1ère édition.
    - 98 SE.

    :
    L'urgent est fait, l'impossible est en cours, pour les miracles prévoir un délai. ___ Écrivez dans un français correct !!

    C++Builder 5 - Delphi 6#2 Entreprise - Delphi 2007 Entreprise - Delphi 2010 Architecte - Delphi XE Entreprise - Delphi XE7 Entreprise - Delphi 10 Entreprise - Delphi 10.3.2 Entreprise - Delphi 10.4.2 Entreprise - Delphi 11.1 Entreprise
    OpenGL 2.1 - Oracle 10g - Paradox - Interbase (XE) - PostgreSQL (15.4)

  7. #7
    Membre chevronné
    Avatar de Pierre Castelain
    Inscrit en
    Avril 2002
    Messages
    523
    Détails du profil
    Informations forums :
    Inscription : Avril 2002
    Messages : 523
    Points : 1 943
    Points
    1 943
    Par défaut
    Voila le code que j'utilise pour afficher sous forme textuelle la version de Windows. Il est plus complet et à priori plus fiable car c'est un portage de code Microsoft.
    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
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
     
     
    type
      TOSVERSIONINFOEX = record
        dwOSVersionInfoSize: DWORD;
        dwMajorVersion: DWORD;
        dwMinorVersion: DWORD;
        dwBuildNumber: DWORD;
        dwPlatformId: DWORD;
        szCSDVersion: array[0..127] of AnsiChar; { Maintenance string for PSS usage }
        wServicePackMajor: WORD;
        wServicePackMinor: WORD;
        wSuiteMask: WORD;
        wProductType: BYTE;
        wReserved: BYTE;
      end;
     
    const
      VER_SERVER_NT                      = DWORD($80000000);
      {$EXTERNALSYM VER_SERVER_NT}
      VER_WORKSTATION_NT                 = $40000000;
      {$EXTERNALSYM VER_WORKSTATION_NT}
      VER_SUITE_SMALLBUSINESS            = $00000001;
      {$EXTERNALSYM VER_SUITE_SMALLBUSINESS}
      VER_SUITE_ENTERPRISE               = $00000002;
      {$EXTERNALSYM VER_SUITE_ENTERPRISE}
      VER_SUITE_BACKOFFICE               = $00000004;
      {$EXTERNALSYM VER_SUITE_BACKOFFICE}
      VER_SUITE_COMMUNICATIONS           = $00000008;
      {$EXTERNALSYM VER_SUITE_COMMUNICATIONS}
      VER_SUITE_TERMINAL                 = $00000010;
      {$EXTERNALSYM VER_SUITE_TERMINAL}
      VER_SUITE_SMALLBUSINESS_RESTRICTED = $00000020;
      {$EXTERNALSYM VER_SUITE_SMALLBUSINESS_RESTRICTED}
      VER_SUITE_EMBEDDEDNT               = $00000040;
      {$EXTERNALSYM VER_SUITE_EMBEDDEDNT}
      VER_SUITE_DATACENTER               = $00000080;
      {$EXTERNALSYM VER_SUITE_DATACENTER}
      VER_SUITE_SINGLEUSERTS             = $00000100;
      {$EXTERNALSYM VER_SUITE_SINGLEUSERTS}
      VER_SUITE_PERSONAL                 = $00000200;
      {$EXTERNALSYM VER_SUITE_PERSONAL}
      VER_SUITE_BLADE                    = $00000400;
      {$EXTERNALSYM VER_SUITE_BLADE}
     
    //
    // RtlVerifyVersionInfo() os product type values
    //
     
      VER_NT_WORKSTATION       = $0000001;
      {$EXTERNALSYM VER_NT_WORKSTATION}
      VER_NT_DOMAIN_CONTROLLER = $0000002;
      {$EXTERNALSYM VER_NT_DOMAIN_CONTROLLER}
      VER_NT_SERVER            = $0000003;
      {$EXTERNALSYM VER_NT_SERVER}
     
    procedure AddString(var Dest: string; const Source: string; const LineFeed: boolean = True);
    begin
      if Dest = '' then
        Dest:= Source
      else
        if LineFeed then
          Dest:= Dest + #13#10 + Source
        else Dest:= Dest + Source;
    end;
     
    procedure AddStrings(var Dest: string; const Header: string;
      const Source: TStrings; const Prefix: string = '  ');
    var
      i: integer;
    begin
      if Source.Count = 1 then
      begin
        if Header <> '' then
          AddString(Dest, Header + ' ' + Source[0])
        else
          AddString(Dest, Source[0]);
      end
      else
      begin
        if Header <> '' then
          AddString(Dest, Header);
        for i:=0 to Source.Count-1 do
          AddString(Dest, Prefix + Source[i]);
      end;
    end;
     
    function SystemVersionText: string;
    type
      THKEY = type Longword;
    var
      osvi: TOSVERSIONINFOEX;
      bOsVersionInfoEx: boolean;
     
      Key: HKEY;
      szProductType : PChar;
      dwBufLen: DWORD;
    begin
      result:= '';
     
      // Try calling GetVersionEx using the OSVERSIONINFOEX structure.
      // If that fails, try using the OSVERSIONINFO structure.
     
      FillChar(osvi, SizeOf(TOSVERSIONINFOEX), 0);
      osvi.dwOSVersionInfoSize:= SizeOf(TOSVERSIONINFOEX);
     
      bOsVersionInfoEx:= GetVersionEx(POSVERSIONINFO(@osvi)^);
      if not bOsVersionInfoEx then
      begin
        // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO.
        osvi.dwOSVersionInfoSize:= SizeOf(TOSVERSIONINFO);
        if not GetVersionEx(POSVERSIONINFO(@osvi)^) then
          exit;
      end;
     
      case osvi.dwPlatformId of
        // Tests for Windows NT product family.
        VER_PLATFORM_WIN32_NT:
        begin
          // Test for the product.
          if osvi.dwMajorVersion <= 4 then
            AddString(result, 'Microsoft Windows NT');
          if (osvi.dwMajorVersion = 5) and (osvi.dwMinorVersion = 0) then
            AddString(result, 'Microsoft Windows 2000');
     
          if bOsVersionInfoEx then  // Use information from GetVersionEx.
          begin
            // Test for the workstation type.
            if osvi.wProductType = VER_NT_WORKSTATION then
            begin
              if (osvi.dwMajorVersion = 5) and (osvi.dwMinorVersion = 1) then
              AddString(result, 'Microsoft Windows XP');
     
              if (osvi.wSuiteMask and VER_SUITE_PERSONAL) <> 0 then
                AddString(result, ' Home Edition', False)
              else
                AddString(result, ' Professional', False);
             end
     
            // Test for the server type.
            else if osvi.wProductType = VER_NT_SERVER then
            begin
              if (osvi.dwMajorVersion = 5) and (osvi.dwMinorVersion = 1) then
                AddString(result, 'Microsoft Windows .NET');
     
              if (osvi.wSuiteMask and VER_SUITE_DATACENTER) <> 0 then
                AddString(result, ' DataCenter Server', False)
              else if (osvi.wSuiteMask and VER_SUITE_ENTERPRISE) <> 0 then
                if osvi.dwMajorVersion = 4 then
                  AddString(result, ' Advanced Server', False)
                else
                  AddString(result, ' Enterprise Server', False)
              else if osvi.wSuiteMask = VER_SUITE_BLADE then
                AddString(result, ' Web Server', False)
              else
                AddString(result, ' Server', False);
            end
          end
          else   // Use the registry on early versions of Windows NT.
          begin
            RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'SYSTEM\\CurrentControlSet\\Control\\ProductOptions',
              0, KEY_QUERY_VALUE, Key );
            szProductType:= StrAlloc(80);
            RegQueryValueEx(Key, 'ProductType', Nil, Nil,
              PByte(szProductType), @dwBufLen);
            RegCloseKey(Key);
            if szProductType = 'WINNT' then
              AddString(result, ' Professional', False);
            if szProductType = 'LANMANNT' then
              AddString(result, ' Server', False);
            if szProductType = 'SERVERNT' then
              AddString(result, ' Advanced Server', False);
            StrDispose(szProductType);
          end;
     
         // Display version, service pack (if any), and build number.
     
          if osvi.dwMajorVersion <= 4  then
            AddString(result, Format('version %d.%d %s (Build %d)',
              [osvi.dwMajorVersion,
               osvi.dwMinorVersion,
               osvi.szCSDVersion,
               osvi.dwBuildNumber and $FFFF]))
          else
            AddString(result, Format('%s (Build %d)',
              [osvi.szCSDVersion,
               osvi.dwBuildNumber and $FFFF]));
        end;
     
         // Test for the Windows 95 product family.
        VER_PLATFORM_WIN32_WINDOWS:
        begin
          if (osvi.dwMajorVersion = 4) and (osvi.dwMinorVersion = 0) then
          begin
            AddString(result, 'Microsoft Windows 95');
            if (osvi.szCSDVersion[1] = 'C') or (osvi.szCSDVersion[1] = 'B') then
              AddString(result, ' OSR2', False);
          end;
     
          if (osvi.dwMajorVersion = 4) and (osvi.dwMinorVersion = 10) then
          begin
            AddString(result, 'Microsoft Windows 98');
            if osvi.szCSDVersion[1] = 'A' then
              AddString(result, ' SE', False);
          end;
     
          if (osvi.dwMajorVersion = 4) and (osvi.dwMinorVersion = 90) then
            AddString(result, 'Microsoft Windows Millennium Edition');
        end;
      end;
    end;

  8. #8
    Inactif  

    Inscrit en
    Mars 2002
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mars 2002
    Messages : 18
    Points : 111
    Points
    111
    Par défaut
    merci
    http://www.egri.co.uk/smileys/walk.gif http://www.developpez.com/delphi/delphihlp.htm
    - Delphi Studio 7 Architecte.
    - Interbase / SQL Server 2000 / Oracle 9i
    - Windows (2000 Famille Server, 98, Me, XP Professionnel).

  9. #9
    Membre à l'essai
    Inscrit en
    Mars 2006
    Messages
    22
    Détails du profil
    Informations personnelles :
    Âge : 52

    Informations forums :
    Inscription : Mars 2006
    Messages : 22
    Points : 24
    Points
    24
    Par défaut J'ai rajouter la détection des serveurs TSE sur le code précédent
    Le code précédent est bien, mais il ne comprenait pas la détection des serveurs TSE... voilà chose faite :
    code précédent modifié : http://ffert.free.fr/page/detail_for...8&theme=delphi
    simple détection TSE : http://ffert.free.fr/page/detail_for...7&theme=delphi


    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
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    function SystemVersionText: string;
    type
      THKEY = type Longword;
    var
      osvi: TOSVERSIONINFOEX;
      bOsVersionInfoEx: boolean;
     
      Key: HKEY;
      szProductType : PChar;
      dwBufLen: DWORD;
    begin
      result:= '';
     
    // Try calling GetVersionEx using the OSVERSIONINFOEX structure.
    // If that fails, try using the OSVERSIONINFO structure.
     
      FillChar(osvi, SizeOf(TOSVERSIONINFOEX), 0);
      osvi.dwOSVersionInfoSize:= SizeOf(TOSVERSIONINFOEX);
     
      bOsVersionInfoEx:= GetVersionEx(POSVERSIONINFO(@osvi)^);
      if not bOsVersionInfoEx then
      begin
        // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO.
        osvi.dwOSVersionInfoSize:= SizeOf(TOSVERSIONINFO);
        if not GetVersionEx(POSVERSIONINFO(@osvi)^) then
          exit;
      end;
     
      case osvi.dwPlatformId of
        // Tests for Windows NT product family.
        VER_PLATFORM_WIN32_NT:
        begin
          // Test for the product.
          if osvi.dwMajorVersion <= 4 then
            AddString(result, 'Microsoft Windows NT');
          if (osvi.dwMajorVersion = 5) and (osvi.dwMinorVersion = 0) then
            AddString(result, 'Microsoft Windows 2000');
     
          if bOsVersionInfoEx then // Use information from GetVersionEx.
          begin
            // Test for the workstation type.
            if osvi.wProductType = VER_NT_WORKSTATION then
            begin
              if (osvi.dwMajorVersion = 5) and (osvi.dwMinorVersion = 1) then
              AddString(result, 'Microsoft Windows XP');
     
              if (osvi.wSuiteMask and VER_SUITE_PERSONAL) <> 0 then
                AddString(result, ' Home Edition', False)
              else
                AddString(result, ' Professional', False);
            end
     
            // Test for the server type.
            else if osvi.wProductType = VER_NT_SERVER then
            begin
              if (osvi.dwMajorVersion = 5) and (osvi.dwMinorVersion = 1) then
                AddString(result, 'Microsoft Windows .NET');
     
              if (osvi.wSuiteMask and VER_SUITE_DATACENTER) <> 0 then
                AddString(result, ' DataCenter Server', False)
              else if (osvi.wSuiteMask and VER_SUITE_ENTERPRISE) <> 0 then
                if osvi.dwMajorVersion = 4 then
                  AddString(result, ' Advanced Server', False)
                else
                  AddString(result, ' Enterprise Server', False)
     
    // AJOUT ICI DE LA PRISE EN CHARGE DU SERVEUR TSE en tant que tel
              else if (osvi.wSuiteMask and VER_SUITE_TERMINAL) <> 0 then
                 AddString(result, ' Terminal Server', False)
     
              else if osvi.wSuiteMask = VER_SUITE_BLADE then
                AddString(result, ' Web Server', False)
              else
                AddString(result, ' Server', False);
            end
          end
          else // Use the registry on early versions of Windows NT.
          begin
            RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'SYSTEM\\CurrentControlSet\\Control\\ProductOptions', 0, KEY_QUERY_VALUE, Key );
            szProductType:= StrAlloc(80);
            RegQueryValueEx(Key, 'ProductType', Nil, Nil, PByte(szProductType), @dwBufLen);
            RegCloseKey(Key);
            if szProductType = 'WINNT' then
              AddString(result, ' Professional', False);
            if szProductType = 'LANMANNT' then
              AddString(result, ' Server', False);
            if szProductType = 'SERVERNT' then
              AddString(result, ' Advanced Server', False);
            StrDispose(szProductType);
          end;
     
          // Display version, service pack (if any), and build number.
     
          if osvi.dwMajorVersion <= 4 then
            AddString(result, Format('version %d.%d %s (Build %d)', [osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.szCSDVersion, osvi.dwBuildNumber and $FFFF]))
          else
            AddString(result, Format('%s (Build %d)', [osvi.szCSDVersion, osvi.dwBuildNumber and $FFFF]));
        end;
     
        // Test for the Windows 95 product family.
        VER_PLATFORM_WIN32_WINDOWS:
        begin
          if (osvi.dwMajorVersion = 4) and (osvi.dwMinorVersion = 0) then
          begin
            AddString(result, 'Microsoft Windows 95');
            if (osvi.szCSDVersion[1] = 'C') or (osvi.szCSDVersion[1] = 'B') then
              AddString(result, ' OSR2', False);
          end;
     
          if (osvi.dwMajorVersion = 4) and (osvi.dwMinorVersion = 10) then
          begin
            AddString(result, 'Microsoft Windows 98');
            if osvi.szCSDVersion[1] = 'A' then
              AddString(result, ' SE', False);
          end;
     
          if (osvi.dwMajorVersion = 4) and (osvi.dwMinorVersion = 90) then
            AddString(result, 'Microsoft Windows Millennium Edition');
        end;
      end;
    end;
    j'ai juste copié la function, le reste étant identique....
    en fait j'ai uniquement ajouté ces 2 lignes :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
              else if (osvi.wSuiteMask and VER_SUITE_TERMINAL) <> 0 then
                 AddString(result, ' Terminal Server', False)
    Pas de grandes modifs donc... pas de gloire à avoir modifé ce code super génial. qui m'a énormément aidé !!! bravo...

    merci encore... bye bye

  10. #10
    Expert éminent sénior
    Avatar de Jipété
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10 730
    Détails du profil
    Informations personnelles :
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10 730
    Points : 15 132
    Points
    15 132
    Par défaut Manque Server 2003 et Vista
    Yep !
    On pourrait modifier le début comme ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
            if osvi.wProductType = VER_NT_WORKSTATION then
            begin
              if (osvi.dwMajorVersion = 6) {and (osvi.dwMinorVersion = ?)} then
              AddString(result, 'Microsoft Windows Vista');
     
              if (osvi.dwMajorVersion = 5) and (osvi.dwMinorVersion = 2) then
              AddString(result, 'Microsoft Windows Sever 2003');
       ...
    J'ai mis la minor de Vista en commentaires because j'la connais pas...
    Mes 2 cts,
    --
    jp
    Il a à vivre sa vie comme ça et il est mûr sur ce mur se creusant la tête : peutêtre qu'il peut être sûr, etc.
    Oui, je milite pour l'orthographe et le respect du trait d'union à l'impératif.
    Après avoir posté, relisez-vous ! Et en cas d'erreur ou d'oubli, il existe un bouton « Modifier », à utiliser sans modération
    On a des lois pour protéger les remboursements aux faiseurs d’argent. On n’en a pas pour empêcher un être humain de mourir de misère.
    Mes 2 cts,
    --
    jp

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. pb d'installation d'Oracle 9 sur windows 2000
    Par condor dans le forum Oracle
    Réponses: 1
    Dernier message: 14/12/2006, 11h40
  2. pb d'installation d'Oracle 9 sur windows 2000
    Par condor dans le forum Oracle
    Réponses: 1
    Dernier message: 14/06/2006, 14h28
  3. Pd de transformation XML/XSL sur un windows 2000 server US
    Par Sylvain Leray dans le forum XMLRAD
    Réponses: 3
    Dernier message: 24/03/2003, 11h00
  4. Pb BDE suite a passage en Windows 2000 pro
    Par ARIF dans le forum Paradox
    Réponses: 4
    Dernier message: 18/11/2002, 11h39
  5. [VB6] Gestionnaire des tache de windows 2000 avec VB6
    Par Argonz dans le forum VB 6 et antérieur
    Réponses: 5
    Dernier message: 12/11/2002, 08h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo