OS Version별 정보.

from Windows 2009/10/15 10:08 / hits (1203)
주의 : 아래 글은 전적으로 개인적인 짦은 지식과 소견으로 작성한 글입니다. 제 전공은 경제학이나 국제금융도 아니고 외환이나 주식관련 애널리스트도 아니기에 아래 정보를 활용해서 발생하는 손실이나 손해에 대해서는 아무런 책임을 질 수 없음을 밝힙니다. 그리고 여기에 쓰는 글은 여기저기 널려있는 수많은 정보들을 제 맘대로 발췌해서 만든 내용이 대다수입니다. 이 정보를 자신을 위해 사용할때는 본인 스스로가 결정하시고, 이 글은 그냥 편하게 읽어주시기 바랍니다.
참고로, 저는 무정부주의자도 아니고, 누구를 모함하거나 잘못된 정보를 전달하기 위해 글을 작성하는 사람도 아닙니다. 정부의 정책을 반대하는 것도 아니고, 동조하지도 않습니다. 그냥 개인적인 의견이므로 아래의 글을 읽기가 걱정되신다면 그대로 페이지를 닫아주시기 바랍니다.


블로그에 글을 작성할때 반드시 밝혀야 하는 사항



Windows95부터 Windows7까지.... OS의 종류가 너무나 많아졌다. -_-;
개인적으로 만들고 있는 유틸리티 프로그램중 하나인 스크린펜이 Windows7에서 동작하지 않는 버그때문에 골머리를 앓고 있다.... 헌데 Windows7을 테스트할 수가 없으니.... -_-; 대략 안습....



Introduction

This article explains how to determine Windows version and edition. The method is very simple: The Windows API provides two functions, GetVersion/GetVersionEx, that fill the structure OSVERSIONINFO/OSVERSIONINFOEX with information such as major and minor version, product type, suite mask, platform, and so forth. This article, however, and the code provided here, does not list all the operating systems ever released by Microsoft, only the most usual ones.

The GetVersionEx() function from Platform SDK obtains extended information about the version of the operating system that is currently running. It uses an OSVERSIONINFO or OSVERSIONINFOEX (for Windows NT 4.0 SP6 and later) structure to retrieve the operating system version information.

The information in OSVERSIONINFO includes major and minor version numbers, a build number, a platform identifier, and descriptive text about the operating system.

The information in OSVERSIONINFOEX includes major and minor version numbers, a build number, a platform identifier, and information about product suites and the latest Service Pack installed on the system.

Note: GetVersionEx only returns correct information if the process does not run under a compatibility layer.



OS Versions

Before trying to retrieve the system version, I will explain how one can differentiate among different versions and editions.

The Win32 platform groups the Win95, Win98, and WinMe operating systems.

사용자 삽입 이미지


All of them have the Major Version equal to 4, and the difference is made by the Minor Version: 0 for Win95, 10 for Win98, and 90 for WinMe. Win95 also comes in an OSR2 release, and you must use the CSD Version to determine the actual edition. If it is 'C' or 'B', it is a OSR2 edition. For Win98, if the CSD Version is 'A', Second Edition is present.

The Windows network platform gathers WinNT, Win2000, WinXP, Win Server 2003, Win Vista, and Win Server 2008.

The first difference is made by the major version:

  • 3 is for Windows NT 3.5
  • 4 is for the Windows NT 4
  • 5 is for Windows 2000, Windows XP, Windows Server 2003 and Windows Home Server
  • 6 is for Windows Vista, Windows Server 2008 and Windows 7


The minor version is used, for instance, to differentiate among Windows 2000 (0), Windows XP(1), Windows Home Server (2) and Windows Server 2003 (2). Both Windows Vista and Windows Server 2008 have the same minor version, 0. Windows 7 and Windows Server 2008 R2 have the minor version 1.

The product type groups the operating systems in servers (3), workstations (2), and domain controllers (1).

Another flag that differentiate between editions is the suite mask. It can indicate an enterprise edition (0x0002), data center edition (0x0080), a personal/home edition (0x0200), or a web edition (0x0400).

A better, visual, grouping of the operating systems is shown in the following images.

For Windows NT:

사용자 삽입 이미지


For Windows 2000, XP, Server 2003 and Home Server:

사용자 삽입 이미지


For Windows Vista, Server 2008 and Windows 7:

사용자 삽입 이미지

In addition to that, on Windows Vista and Windows Server 2008 a new function is available in kernel32.dll, called GetProductInfo(). It retrieves the product type for the operating system on the local computer, and maps the type to the product types supported by the specified operating system. You have to supply the major and minor version of the OS and the major and minor version of the service pack; then it returns a value that can indicate an unknown product, and unlicensed product or a specific edition such as business, ultimate, enterprise, enterprise server, and so on. For more about the function and possible value, see MSDN.

Determining Windows Vista, Windows Server 2008 and Windows 7 edition based on the product type returned by GetProductInfo():

사용자 삽입 이미지


출처 : http://www.codeguru.com/cpp/misc/misc/system/article.php/c8973/





포스팅이 유익 하셨다면 RSS 구독을 신청하세요

Trackback Address >> http://dolba.net/tt/k2club/trackback/2332

  1. 구차니 2009/10/15 12:25  address  modify / delete  reply

    그래도 윈도우는 계보가 단순하잖아요 ㅎㅎ
    UNIX/LINUX 계열은... GG 입니다 ㅋ

  2. 코즈 2010/01/26 14:47  address  modify / delete  reply

    좋은 정보 감사드립니다.
    괜찮으시면 제 블로그로 퍼가도 될까요?

    •  address  modify / delete 2010/01/26 21:02 그리움

      위 글은 본문에서도 밝혔듯이 원본의 출처가 따로 있습니다.
      굳이 제 허락을 받지 않으셔도 될 듯 합니다.

      저도 외국 사이트에서 스크랩 해 온 자료이기 때문에, 제가 허락을 해드릴 그런 권한이 없다는거죠. ^^;