OperatingSystem 를 사용해서 윈도우 버전을 구할수 있습니다.

 전체 소스 :
        WATWindowsVersion.zip

WATWindowsVersion.gif

 

아래는 주요 소스 입니다.

=================================================================

namespace WATWindowsVersion
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {

            OperatingSystem os = Environment.OSVersion;
            Version v = os.Version;

            if (5 == v.Major && v.Minor>0)
            {
                txtResult.Text += "Windows XP" + "\r\n";
            }
            else
            {
                txtResult.Text += "그 외 OS" + "\r\n";

            }

            txtResult.Text += os.ServicePack + "\r\n";
            txtResult.Text += "Build : "+v.Build + "\r\n";
            txtResult.Text += "Revision : " + v.Revision + "\r\n";

        }
    }
}

+ Recent posts