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 |
'Dev Language > C#' 카테고리의 다른 글
AES, SHA 암호화 3, C# (0) | 2017.03.30 |
---|---|
외부에서 호스팅업체 MYSQL 접근하기(+ DLL 포함 컴파일) (0) | 2016.10.05 |
Mac Address Changer(맥 어드레스 변경) (0) | 2015.12.30 |
.NET Decompile (닷텟 디컴파일) (0) | 2015.06.04 |
엑셀 exprot (0) | 2015.02.24 |