fixed NotSupported/UnReleased OSVersion handling, fixed OSVersion class not 100% handling OS Version correctly under all circumstances, fixed Windows 2000 support

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2259 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
dmex04
2009-10-18 08:02:46 +00:00
parent 79f0e85979
commit 6827088946
2 changed files with 85 additions and 12 deletions
+14 -1
View File
@@ -119,11 +119,24 @@ namespace ProcessHacker
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (Environment.Version.Major < 2)
//before parsing commandline arguments, check OS support.
if (OSVersion.IsBelow(WindowsVersion.Win2000))
{
PhUtils.ShowError("This Operating System is not supported!");
Environment.Exit(1);
}
else if (OSVersion.WindowsVersion == WindowsVersion.Unreleased)
{
PhUtils.ShowError("This Operating System is unreleased and not currently supported," +
"\nProcess Hacker support has not been tested so expect bugs and issues.");
}
if (Environment.Version.Major < 2)
{
PhUtils.ShowError("You must have .NET Framework 2.0 or higher to use Process Hacker.");
Environment.Exit(1);
}
#if !DEBUG
// Setup exception handling at first opportunity to catch exceptions generatable anywhere.
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);