diff --git a/AdvancedInstaller/wu10man.aip b/AdvancedInstaller/wu10man.aip index 3181707..f5887d8 100644 --- a/AdvancedInstaller/wu10man.aip +++ b/AdvancedInstaller/wu10man.aip @@ -16,10 +16,10 @@ - + - + @@ -49,6 +49,11 @@ + + + + + @@ -66,6 +71,11 @@ + + + + + @@ -147,6 +157,11 @@ + + + + + diff --git a/README.md b/README.md index 5e29392..e776ac6 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ There was a fair amount of research that went into this, but a couple sites stoo - [Windows Update Server List](https://www.tenforums.com/windows-updates-activation/38771-windows-updates-white-list-proxy-server.html) - [Windows Service Authorization](https://stackoverflow.com/questions/17031552/how-do-you-take-file-ownership-with-powershell/17047190#17047190) - [Change Windows Service Password](https://stackoverflow.com/questions/3876787/change-windows-service-password/3877268#3877268) +- [Windows 10, version 1709 basic level Windows diagnostic events and fields](https://docs.microsoft.com/en-us/windows/privacy/basic-level-windows-diagnostic-events-and-fields-1709) +- ### Downloads https://github.com/WereDev/Wu10Man/releases diff --git a/Wu10Man/App.config b/Wu10Man/App.config index 9693cb7..062aa13 100644 --- a/Wu10Man/App.config +++ b/Wu10Man/App.config @@ -1,34 +1,9 @@  - - -
- - - - - - - False - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Wu10Man/App.xaml.cs b/Wu10Man/App.xaml.cs index da32b1d..3d1bb49 100644 --- a/Wu10Man/App.xaml.cs +++ b/Wu10Man/App.xaml.cs @@ -1,7 +1,8 @@ using System; using System.Windows; using WereDev.Utils.Wu10Man.Helpers; - +using WereDev.Utils.Wu10Man.UserWindows; + namespace WereDev.Utils.Wu10Man { /// @@ -14,11 +15,11 @@ public App() : base() Wu10Logger.LogInfo("Application starting"); try { - var version = this.GetType().Assembly.GetName().Version; - Wu10Logger.LogInfo($"Application version: v{version.ToString()}"); + WriteStartupLogs(); this.Dispatcher.UnhandledException += OnDispatcherUnhandledException; this.MainWindow = new MainWindow(); this.MainWindow.Show(); + Wu10Logger.LogInfo("Application started"); } catch (Exception ex) @@ -42,5 +43,13 @@ void OnDispatcherUnhandledException(object sender, System.Windows.Threading.Disp MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error); e.Handled = true; } + + void WriteStartupLogs() + { + var appVersion = this.GetType().Assembly.GetName().Version; + Wu10Logger.LogInfo($"Application version: v{appVersion.ToString()}"); + Wu10Logger.LogInfo(EnvironmentVersionHelper.GetWindowsVersion()); + Wu10Logger.LogInfo($".Net Framework: {EnvironmentVersionHelper.GetDotNetFrameworkBuild()}"); + } } } diff --git a/Wu10Man/Editors/HostsEditor.cs b/Wu10Man/Editors/HostsEditor.cs index 931f985..0bd92a6 100644 --- a/Wu10Man/Editors/HostsEditor.cs +++ b/Wu10Man/Editors/HostsEditor.cs @@ -43,13 +43,16 @@ public string[] GetHostsInFile() private string[] GetHostsFromLines(IEnumerable lines) { - var hosts = lines.Select(x => GetHostFromLine(x)); - return hosts.ToArray(); + var hosts = lines.Select(x => GetHostFromLine(x)) + .Where(x => !string.IsNullOrEmpty(x)) + .ToArray(); + return hosts; } private string GetHostFromLine(string line) { line = line.Trim(); + if (line == string.Empty) return line; var split = line.Split((char[])null, StringSplitOptions.RemoveEmptyEntries); return split[1]; } diff --git a/Wu10Man/Helpers/EnvironmentVersionHelper.cs b/Wu10Man/Helpers/EnvironmentVersionHelper.cs new file mode 100644 index 0000000..8c1ea51 --- /dev/null +++ b/Wu10Man/Helpers/EnvironmentVersionHelper.cs @@ -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}"; + } + } +} diff --git a/Wu10Man/Properties/AssemblyInfo.cs b/Wu10Man/Properties/AssemblyInfo.cs index 1e87a7e..6b4c67d 100644 --- a/Wu10Man/Properties/AssemblyInfo.cs +++ b/Wu10Man/Properties/AssemblyInfo.cs @@ -50,7 +50,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.3.0")] -[assembly: AssemblyFileVersion("2.1.3.0")] +[assembly: AssemblyVersion("3.0.0.0")] +[assembly: AssemblyFileVersion("3.0.0.0")] [assembly: NeutralResourcesLanguage("en-US")] diff --git a/Wu10Man/Properties/Settings.Designer.cs b/Wu10Man/Properties/Settings.Designer.cs deleted file mode 100644 index 01bfde4..0000000 --- a/Wu10Man/Properties/Settings.Designer.cs +++ /dev/null @@ -1,38 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WereDev.Utils.Wu10Man.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowAdvanced { - get { - return ((bool)(this["ShowAdvanced"])); - } - set { - this["ShowAdvanced"] = value; - } - } - } -} diff --git a/Wu10Man/Properties/Settings.settings b/Wu10Man/Properties/Settings.settings deleted file mode 100644 index 72059c4..0000000 --- a/Wu10Man/Properties/Settings.settings +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - False - - - \ No newline at end of file diff --git a/Wu10Man/UserControls/AdvancedOptions.xaml b/Wu10Man/UserControls/AdvancedOptions.xaml deleted file mode 100644 index 6fa9880..0000000 --- a/Wu10Man/UserControls/AdvancedOptions.xaml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Wu10Man/UserControls/AdvancedOptions.xaml.cs b/Wu10Man/UserControls/AdvancedOptions.xaml.cs deleted file mode 100644 index c9b7c6e..0000000 --- a/Wu10Man/UserControls/AdvancedOptions.xaml.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Windows.Controls; -using WereDev.Utils.Wu10Man.Helpers; - -namespace WereDev.Utils.Wu10Man.UserControls -{ - /// - /// Interaction logic for AdvancedOptions.xaml - /// - public partial class AdvancedOptions : UserControl - { - public AdvancedOptions() - { - Wu10Logger.LogInfo("Advanced control initializing."); - InitializeComponent(); - Wu10Logger.LogInfo("Advanced control initialized."); - } - } -} diff --git a/Wu10Man/UserControls/BasicOptions.xaml b/Wu10Man/UserControls/BasicOptions.xaml deleted file mode 100644 index ee7acb8..0000000 --- a/Wu10Man/UserControls/BasicOptions.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/Wu10Man/UserControls/BasicOptions.xaml.cs b/Wu10Man/UserControls/BasicOptions.xaml.cs deleted file mode 100644 index a486858..0000000 --- a/Wu10Man/UserControls/BasicOptions.xaml.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Windows.Controls; -using WereDev.Utils.Wu10Man.Helpers; - -namespace WereDev.Utils.Wu10Man.UserControls -{ - /// - /// Interaction logic for BasicOptions.xaml - /// - public partial class BasicOptions : UserControl - { - public BasicOptions() - { - Wu10Logger.LogInfo("Basic control initializing."); - InitializeComponent(); - Wu10Logger.LogInfo("Basic control initialized."); - } - } -} diff --git a/Wu10Man/UserControls/GroupPolicyControl.xaml b/Wu10Man/UserControls/GroupPolicyControl.xaml index a1b5ffa..8591892 100644 --- a/Wu10Man/UserControls/GroupPolicyControl.xaml +++ b/Wu10Man/UserControls/GroupPolicyControl.xaml @@ -1,16 +1,43 @@ - + -