달력

42024  이전 다음

  • 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

public string GetPlatform()
        {
            OperatingSystem osversion = System.Environment.OSVersion;
            string winName = "";


            switch (osversion.Platform)
            {
                case PlatformID.Win32Windows:
                    if (osversion.Version.Major == 4)
                    {
                        switch (osversion.Version.Minor)
                        {
                            case 0:
                                winName = "Windows 95";
                                break;
                            case 10:
                                winName = "Windows 98";
                                break;
                            case 90:
                                winName = "Windows Me";
                                break;
                        }
                    }
                    break;

 

                case PlatformID.Win32NT:
                    if (osversion.Version.Major == 4)
                    {
                        winName = "Windows NT 4.0";
                    }
                    else if (osversion.Version.Major == 5)
                    {
                        switch (osversion.Version.Minor)
                        {
                            case 0:
                                winName = "Windows 2000";
                                break;
                            case 1:
                                winName = "Windows XP";
                                break;
                            case 2:
                                winName = "Windows Server 2003";
                                break;
                        }
                    }
                    else if (osversion.Version.Major == 6)
                    {
                        switch (osversion.Version.Minor)
                        {
                            case 0:
                                winName = "Windows Vista";
                                break;
                            case 1:
                                winName = "Windows 7";
                                break;
                            case 2:
                                winName = "Windows 8";
                                break;
                            case 3:
                                winName = "Windows 8.1";
                                break;
                        }
                    }
                    else if (osversion.Version.Major == 10)
                    {
                        switch (osversion.Version.Minor)
                        {
                            case 0:
                                winName = "Windows 10";
                                break;
                        }
                    }
                    break;
            }//switch QUIT
            return winName;
        }

 

 

Operating system Version number
Windows 10 10.0*
Windows Server 2016 Technical Preview 10.0*
Windows 8.1 6.3*
Windows Server 2012 R2 6.3*
Windows 8 6.2
Windows Server 2012 6.2
Windows 7 6.1
Windows Server 2008 R2 6.1
Windows Server 2008 6.0
Windows Vista 6.0
Windows Server 2003 R2 5.2
Windows Server 2003 5.2
Windows XP 64-Bit Edition 5.2
Windows XP 5.1
Windows 2000 5.0

 

 

 

 

 

 

 

 

 

 

Posted by 타카스 류지
|