public static bool IsVistaOrLater() { OperatingSystem sys = System.Environment.OSVersion; if (sys.Platform == PlatformID.Win32NT && sys.Version.Major >= 6) return true; return false; }