static ComNetOS() { OperatingSystem oSVersion = Environment.OSVersion; if (oSVersion.Platform == PlatformID.Win32Windows) { IsWin9x = true; } else { try { IsAspNetServer = Thread.GetDomain().GetData(".appDomain") != null; } catch { } IsWinNt = true; IsWin2K = true; if ((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 0)) { IsWinHttp51 = oSVersion.Version.MajorRevision >= 3; } else { IsPostWin2K = true; if ((((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 1)) && (oSVersion.Version.MajorRevision >= 2)) || (oSVersion.Version.Major >= 6)) { IsXpSp2 = true; } if ((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 1)) { IsWinHttp51 = oSVersion.Version.MajorRevision >= 1; } else { IsWinHttp51 = true; IsWin2k3 = true; if ((((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 2)) && (oSVersion.Version.MajorRevision >= 1)) || (oSVersion.Version.Major >= 6)) { IsWin2k3Sp1 = true; } if (oSVersion.Version.Major >= 6) { IsVista = true; } if ((oSVersion.Version.Major >= 7) || ((oSVersion.Version.Major == 6) && (oSVersion.Version.Minor >= 1))) { IsWin7 = true; } InstallationType = GetWindowsInstallType(); if (Logging.On) { Logging.PrintInfo(Logging.Web, SR.GetString("net_osinstalltype", new object[] { InstallationType })); } } } } }
static ComNetOS() { OperatingSystem oSVersion = Environment.OSVersion; if (oSVersion.Platform == PlatformID.Win32Windows) { IsWin9x = true; } else { try { IsAspNetServer = Thread.GetDomain().GetData(".appDomain") != null; } catch { } IsWinNt = true; IsWin2K = true; if ((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 0)) { IsWinHttp51 = oSVersion.Version.MajorRevision >= 3; } else { IsPostWin2K = true; if ((((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 1)) && (oSVersion.Version.MajorRevision >= 2)) || (oSVersion.Version.Major >= 6)) { IsXpSp2 = true; } if ((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 1)) { IsWinHttp51 = oSVersion.Version.MajorRevision >= 1; } else { IsWinHttp51 = true; IsWin2k3 = true; if ((((oSVersion.Version.Major == 5) && (oSVersion.Version.Minor == 2)) && (oSVersion.Version.MajorRevision >= 1)) || (oSVersion.Version.Major >= 6)) { IsWin2k3Sp1 = true; } if (oSVersion.Version.Major >= 6) { IsVista = true; } if ((oSVersion.Version.Major >= 7) || ((oSVersion.Version.Major == 6) && (oSVersion.Version.Minor >= 1))) { IsWin7 = true; } InstallationType = GetWindowsInstallType(); if (Logging.On) { Logging.PrintInfo(Logging.Web, SR.GetString("net_osinstalltype", new object[] { InstallationType })); } } } } }
static ComNetOS() { OperatingSystem operatingSystem = Environment.OSVersion; GlobalLog.Print("ComNetOS::.ctor(): " + operatingSystem.ToString()); Debug.Assert(operatingSystem.Platform != PlatformID.Win32Windows, "Windows 9x is not supported"); // // Detect ASP+ as a platform running under NT // try { IsAspNetServer = (Thread.GetDomain().GetData(".appDomain") != null); } catch { } IsWin7orLater = (operatingSystem.Version >= new Version(6, 1)); IsWin7Sp1orLater = (operatingSystem.Version >= new Version(6, 1, 7601)); IsWin8orLater = (operatingSystem.Version >= new Version(6, 2)); InstallationType = GetWindowsInstallType(); if (Logging.On) Logging.PrintInfo(Logging.Web, SR.GetString(SR.net_osinstalltype, InstallationType)); }