Another tutorial from my developing for windows 7 series. How to check what OS the program is running on.

OperatingSystem SystemInfo = Environment.OSVersion; public Form1() { InitializeComponent(); label2.Text = SystemInfo.VersionString; label1.Text = OSV(); } private string OSV() { if (SystemInfo.Platform == System.PlatformID.Win32NT) { if (SystemInfo.Version.Major == 5) return "XP"; else if (SystemInfo.Version.Major == 6) { if (SystemInfo.Version.Minor == 1) return "Win 7"; return "Vista"; } } return ""; }