Skip to content

Commit

Permalink
Remove 2012 R2 support
Browse files Browse the repository at this point in the history
Sandstorm doesn't support it
  • Loading branch information
ocdtrekkie committed Jul 4, 2024
1 parent 62586c8 commit 05edc13
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions modSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,7 @@ public static string GetWindowsVersion()
try
{
RegistryKey currentVersion = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\MICROSOFT\Windows NT\CurrentVersion");
string currentWindowsVersion = "";
if (currentVersion.GetValue("CurrentBuild").ToString() == "9600") {
// Temporary support for Windows Server 2012 R2
currentWindowsVersion = "6.3.9600." + "." + currentVersion.GetValue("UBR").ToString();
} else {
currentWindowsVersion = currentVersion.GetValue("CurrentMajorVersionNumber").ToString() + "." + currentVersion.GetValue("CurrentMinorVersionNumber").ToString() + "." + currentVersion.GetValue("CurrentBuild").ToString() + "." + currentVersion.GetValue("UBR").ToString();
}
string currentWindowsVersion = currentVersion.GetValue("CurrentMajorVersionNumber").ToString() + "." + currentVersion.GetValue("CurrentMinorVersionNumber").ToString() + "." + currentVersion.GetValue("CurrentBuild").ToString() + "." + currentVersion.GetValue("UBR").ToString();

string oldWindowsVersion = modDatabase.GetConfig("System_LastKnownWindowsVersion");
if (oldWindowsVersion != currentWindowsVersion)
Expand Down

0 comments on commit 05edc13

Please sign in to comment.