Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
WereDev committed Jul 14, 2019
2 parents fdea02d + 892e50f commit 1f3260f
Show file tree
Hide file tree
Showing 29 changed files with 735 additions and 412 deletions.
19 changes: 17 additions & 2 deletions AdvancedInstaller/wu10man.aip
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<ROW Property="ARPURLUPDATEINFO" Value="https://github.com/WereDev/Wu10Man/releases"/>
<ROW Property="CTRLS" Value="2"/>
<ROW Property="Manufacturer" Value="Weredev"/>
<ROW Property="ProductCode" Value="1033:{BF8674A6-4567-45E9-BC7A-6E9D53BCFC86} " Type="16"/>
<ROW Property="ProductCode" Value="1033:{ABB62A39-7068-4931-84D9-8BFC9FDD3CB7} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="Wu10Man"/>
<ROW Property="ProductVersion" Value="2.1.3.0" Type="32" TargetFile="Wu10Man.exe"/>
<ROW Property="ProductVersion" Value="3.0.0.0" Type="32" TargetFile="Wu10Man.exe"/>
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
Expand Down Expand Up @@ -49,6 +49,11 @@
<ROW Component="NLog.dll" ComponentId="{FF65DAAD-D873-40A0-B483-5E1CD921797E}" Directory_="APPDIR" Attributes="0" KeyPath="NLog.dll"/>
<ROW Component="ProductInformation" ComponentId="{71412340-B01D-4815-A1B9-38799C2662D3}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
<ROW Component="SHORTCUTDIR" ComponentId="{67BBCAC2-83AE-4110-98F9-2B38EDFFDAF6}" Directory_="SHORTCUTDIR" Attributes="0"/>
<ROW Component="System.Diagnostics.EventLog.dll" ComponentId="{C1E23B02-B39D-4CFA-BAEC-7CB81D65DAB6}" Directory_="APPDIR" Attributes="0" KeyPath="System.Diagnostics.EventLog.dll"/>
<ROW Component="System.Security.AccessControl.dll" ComponentId="{81B6BBFF-E4C0-4C13-980D-6647E12F0C89}" Directory_="APPDIR" Attributes="0" KeyPath="System.Security.AccessControl.dll"/>
<ROW Component="System.Security.Permissions.dll" ComponentId="{333431F5-A3EA-411A-809B-03F429E24D39}" Directory_="APPDIR" Attributes="0" KeyPath="System.Security.Permissions.dll"/>
<ROW Component="System.Security.Principal.Windows.dll" ComponentId="{0AC391B8-C3B1-42D1-A240-C51F974BB773}" Directory_="APPDIR" Attributes="0" KeyPath="System.Security.Principal.Windows.dll"/>
<ROW Component="System.ServiceProcess.ServiceController.dll" ComponentId="{05BF8650-2735-4B0C-A10C-A2099E89B3A8}" Directory_="APPDIR" Attributes="0" KeyPath="System.ServiceProcess.ServiceController.dll"/>
<ROW Component="System.Windows.Interactivity.dll" ComponentId="{C6339B30-661C-41C7-ACEC-84A83650CAEE}" Directory_="APPDIR" Attributes="0" KeyPath="System.Windows.Interactivity.dll"/>
<ROW Component="WPFSpark.dll" ComponentId="{D9F0BEE1-3647-44A5-A52E-866DD2345227}" Directory_="APPDIR" Attributes="0" KeyPath="WPFSpark.dll"/>
<ROW Component="Wu10Man.exe" ComponentId="{302C40F2-9077-4975-B738-3C84CA5A3776}" Directory_="APPDIR" Attributes="0" KeyPath="Wu10Man.exe"/>
Expand All @@ -66,6 +71,11 @@
<ROW File="NLog.dll" Component_="NLog.dll" FileName="NLog.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\NLog.dll" SelfReg="false"/>
<ROW File="System.Windows.Interactivity.dll" Component_="System.Windows.Interactivity.dll" FileName="SYSTEM~1.DLL|System.Windows.Interactivity.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\System.Windows.Interactivity.dll" SelfReg="false"/>
<ROW File="WPFSpark.dll" Component_="WPFSpark.dll" FileName="WPFSpark.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\WPFSpark.dll" SelfReg="false"/>
<ROW File="System.Diagnostics.EventLog.dll" Component_="System.Diagnostics.EventLog.dll" FileName="SYSTEM~2.DLL|System.Diagnostics.EventLog.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\System.Diagnostics.EventLog.dll" SelfReg="false"/>
<ROW File="System.Security.AccessControl.dll" Component_="System.Security.AccessControl.dll" FileName="SYSTEM~3.DLL|System.Security.AccessControl.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\System.Security.AccessControl.dll" SelfReg="false"/>
<ROW File="System.Security.Permissions.dll" Component_="System.Security.Permissions.dll" FileName="SYSTEM~4.DLL|System.Security.Permissions.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\System.Security.Permissions.dll" SelfReg="false"/>
<ROW File="System.Security.Principal.Windows.dll" Component_="System.Security.Principal.Windows.dll" FileName="SYSTEM~5.DLL|System.Security.Principal.Windows.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\System.Security.Principal.Windows.dll" SelfReg="false"/>
<ROW File="System.ServiceProcess.ServiceController.dll" Component_="System.ServiceProcess.ServiceController.dll" FileName="SYSTEM~6.DLL|System.ServiceProcess.ServiceController.dll" Attributes="0" SourcePath="..\Wu10Man\bin\Release\System.ServiceProcess.ServiceController.dll" SelfReg="false"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BootstrOptComponent">
<ROW BootstrOptKey="GlobalOptions" DownloadFolder="[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites" Options="2"/>
Expand Down Expand Up @@ -147,6 +157,11 @@
<ROW Feature_="MainFeature" Component_="Wu10Man.exe"/>
<ROW Feature_="MainFeature" Component_="Wu10Man.exe.config"/>
<ROW Feature_="MainFeature" Component_="APPDIR"/>
<ROW Feature_="MainFeature" Component_="System.Diagnostics.EventLog.dll"/>
<ROW Feature_="MainFeature" Component_="System.Security.AccessControl.dll"/>
<ROW Feature_="MainFeature" Component_="System.Security.Permissions.dll"/>
<ROW Feature_="MainFeature" Component_="System.Security.Principal.Windows.dll"/>
<ROW Feature_="MainFeature" Component_="System.ServiceProcess.ServiceController.dll"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
<ROW Name="wu10man.exe" SourcePath="..\Wu10Man\wu10man.ico" Index="0"/>
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 0 additions & 25 deletions Wu10Man/App.config
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>
15 changes: 12 additions & 3 deletions Wu10Man/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using System.Windows;
using WereDev.Utils.Wu10Man.Helpers;

using WereDev.Utils.Wu10Man.UserWindows;

namespace WereDev.Utils.Wu10Man
{
/// <summary>
Expand All @@ -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)
Expand All @@ -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()}");
}
}
}
7 changes: 5 additions & 2 deletions Wu10Man/Editors/HostsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ public string[] GetHostsInFile()

private string[] GetHostsFromLines(IEnumerable<string> 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];
}
Expand Down
47 changes: 47 additions & 0 deletions Wu10Man/Helpers/EnvironmentVersionHelper.cs
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}";
}
}
}
4 changes: 2 additions & 2 deletions Wu10Man/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

38 changes: 0 additions & 38 deletions Wu10Man/Properties/Settings.Designer.cs

This file was deleted.

9 changes: 0 additions & 9 deletions Wu10Man/Properties/Settings.settings

This file was deleted.

39 changes: 0 additions & 39 deletions Wu10Man/UserControls/AdvancedOptions.xaml

This file was deleted.

18 changes: 0 additions & 18 deletions Wu10Man/UserControls/AdvancedOptions.xaml.cs

This file was deleted.

12 changes: 0 additions & 12 deletions Wu10Man/UserControls/BasicOptions.xaml

This file was deleted.

18 changes: 0 additions & 18 deletions Wu10Man/UserControls/BasicOptions.xaml.cs

This file was deleted.

Loading

0 comments on commit 1f3260f

Please sign in to comment.