This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
735 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<section name="WereDev.Utils.Wu10Man.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<appSettings> | ||
<add key="WindowsUpdateUrls" value="stats.microsoft.com,download.microsoft.com,update.microsoft.com,windowsupdate.microsoft.com,windowsupdate.com,download.windowsupdate.com,ntservicepack.microsoft.com,wustat.windows.com" /> | ||
<add key="ClientSettingsProvider.ServiceUri" value="" /> | ||
</appSettings> | ||
<userSettings> | ||
<WereDev.Utils.Wu10Man.Properties.Settings> | ||
<setting name="ShowAdvanced" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
</WereDev.Utils.Wu10Man.Properties.Settings> | ||
</userSettings> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> | ||
</startup> | ||
<system.web> | ||
<membership defaultProvider="ClientAuthenticationMembershipProvider"> | ||
<providers> | ||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> | ||
</providers> | ||
</membership> | ||
<roleManager defaultProvider="ClientRoleProvider" enabled="true"> | ||
<providers> | ||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> | ||
</providers> | ||
</roleManager> | ||
</system.web> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace WereDev.Utils.Wu10Man.Helpers | ||
{ | ||
public static class EnvironmentVersionHelper | ||
{ | ||
private const string WindowsVersionRegistryKey = @"SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion"; | ||
private const string DotNetVersionRegistryKey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"; | ||
public static string GetDotNetFrameworkBuild() | ||
{ | ||
var release = Editors.RegistryEditor.ReadLocalMachineRegistryValue(DotNetVersionRegistryKey, "Release"); | ||
int.TryParse(release, out var releaseInt); | ||
|
||
if (releaseInt >= 528040) | ||
return $"{release} / 4.8 or later"; | ||
else if (releaseInt >= 461808) | ||
return $"{release} / 4.7.2"; | ||
else if (releaseInt >= 461308) | ||
return $"{release} / 4.7.1"; | ||
else if (releaseInt >= 460798) | ||
return $"{release} / 4.7"; | ||
else if (releaseInt >= 394802) | ||
return $"{release} / 4.6.2"; | ||
else if (releaseInt >= 394254) | ||
return $"{release} / 4.6.1"; | ||
else if (releaseInt >= 393295) | ||
return $"{release} / 4.6"; | ||
else if (releaseInt >= 393273) | ||
return $"{release} / 4.6 RC"; | ||
else if ((releaseInt >= 379893)) | ||
return $"{release} / 4.5.2"; | ||
else if ((releaseInt >= 378675)) | ||
return $"{release} / 4.5.1"; | ||
else if ((releaseInt >= 378389)) | ||
return $"{release} / 4.5"; | ||
else | ||
return $"{release} / No 4.5 or later version detected"; | ||
} | ||
|
||
public static string GetWindowsVersion() | ||
{ | ||
var windowsProduct = Editors.RegistryEditor.ReadLocalMachineRegistryValue(WindowsVersionRegistryKey, "ProductName"); | ||
var windowsRelease = Editors.RegistryEditor.ReadLocalMachineRegistryValue(WindowsVersionRegistryKey, "ReleaseId"); | ||
var windowsBuild = Editors.RegistryEditor.ReadLocalMachineRegistryValue(WindowsVersionRegistryKey, "CurrentBuild"); | ||
var windowsBuildRevision = Editors.RegistryEditor.ReadLocalMachineRegistryValue(WindowsVersionRegistryKey, "BaseBuildRevisionNumber"); | ||
return $"{windowsProduct} Version {windowsRelease} Build {windowsBuild}.{windowsBuildRevision}"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.