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

Commit

Permalink
Prepping for 4.4 (#52)
Browse files Browse the repository at this point in the history
* Adding some other tasks and tinkering with better wpf for tasks screen

* Updating verbiage in Pause control to make it more clear

* stylecop updates

* trying improved styling with the readme

* really better to remove the styling on the readme

* adding Telemetry service to list of things one can disable

* creating signed dlls and prepping for 4.4 release

* updating readme

Co-authored-by: weredev <gitlab@weredev.com>
  • Loading branch information
WereDev and weredev committed Feb 17, 2022
1 parent 85d8573 commit f7d5ed6
Show file tree
Hide file tree
Showing 15 changed files with 563 additions and 97 deletions.
7 changes: 4 additions & 3 deletions AdvancedInstaller/wu10man.aip
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOCUMENT Type="Advanced Installer" CreateVersion="15.0" version="18.2" Modules="simple" RootPath="." Language="en" Id="{F18B9A17-E631-498A-8CF8-210F80EA0231}">
<DOCUMENT Type="Advanced Installer" CreateVersion="15.0" version="19.1" Modules="simple" RootPath="." Language="en" Id="{F18B9A17-E631-498A-8CF8-210F80EA0231}">
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
<ROW Property="AI_CURRENT_YEAR" Value="2021" ValueLocId="-"/>
<ROW Property="AI_CURRENT_YEAR" Value="2022" ValueLocId="-"/>
<ROW Property="AI_RUN_AS_ADMIN" Value="0"/>
<ROW Property="ALLUSERS" Value="1"/>
<ROW Property="ARPCOMMENTS" Value="Installer package for Wu10Man" ValueLocId="*"/>
Expand All @@ -17,7 +17,7 @@
<ROW Property="ProductCode" Value="1033:{00273625-7096-487C-A5AB-A5116B423932} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="Wu10Man"/>
<ROW Property="ProductVersion" Value="4.3.0.0" Type="32" TargetFile="Wu10Man.exe"/>
<ROW Property="ProductVersion" Value="4.4.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 @@ -109,6 +109,7 @@
<ROW Fragment="SequenceDialogs.aip" Path="&lt;AI_THEMES&gt;classic\fragments\SequenceDialogs.aip"/>
<ROW Fragment="Sequences.aip" Path="&lt;AI_FRAGS&gt;Sequences.aip"/>
<ROW Fragment="StaticUIStrings.aip" Path="&lt;AI_FRAGS&gt;StaticUIStrings.aip"/>
<ROW Fragment="Themes.aip" Path="&lt;AI_FRAGS&gt;Themes.aip"/>
<ROW Fragment="UI.aip" Path="&lt;AI_THEMES&gt;classic\fragments\UI.aip"/>
<ROW Fragment="Validation.aip" Path="&lt;AI_FRAGS&gt;Validation.aip"/>
<ROW Fragment="VerifyRemoveDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\VerifyRemoveDlg.aip"/>
Expand Down
228 changes: 228 additions & 0 deletions AdvancedInstaller/wu10man.back (1).aip

Large diffs are not rendered by default.

38 changes: 24 additions & 14 deletions README.md
Expand Up @@ -4,23 +4,31 @@ This started out as a project to shut down the Windows Update mechanic. It grew

With 4.0, I realized another major annoyance of Windows 10 is a lot of bloatware. Random apps that either aren't needed or that are added bloatware.

If you've found this a useful app, perhaps you'd like to <a class="bmc-button" target="_blank" href="https://www.buymeacoffee.com/weredev"><span style="margin-left:5px;font-size:28px !important;">buy me a coffee?</span></a>
If you've found this a useful app, perhaps you'd like to [buy me a coffee?](https://www.buymeacoffee.com/weredev)

## Top Caffeinators
Thank you so much for your contributions and helping fun the battle against Windows Update!

- Ihor - for keeping me awake all week!
- Someone<sub>5</sub> - for all the caffeine goodness!
- Someone<sub>4</sub> - for the super buzzed week, or normally buzzed two weeks!
- Redfella - kept me caffeinated for a whole month!!
- piratour20 - for the late evening coffee!
- Someone<sub>3</sub> - provided a couple good jolts of caffeine!
- pc305.com - got me a wake-up cup o' joe!
- John - coffeed me through a long week!
- Someone<sub>2</sub> - coffeed me through a long week at work!
- Wes - who coffeed me through hump day!
- Someone<sub>1</sub> - who bought me a keg of coffee!
- Govardhan - who bought me a coffee!
- Someone<sub>1</sub> - who bought me a keg of coffee!
- Wes - who coffeed me through hump day!
- Someone<sub>2</sub> - coffeed me through a long week at work!
- John - coffeed me through a long week!
- pc305.com - got me a wake-up cup o' joe!
- Someone<sub>3</sub> - provided a couple good jolts of caffeine!
- piratour20 - for the late evening coffee!
- Redfella - kept me caffeinated for a whole month!!
- Someone<sub>4</sub> - for the super buzzed week, or normally buzzed two weeks!
- Someone<sub>5</sub> - for all the caffeine goodness!
- Someone<sub>6</sub> - for the fancy mocah!
- Ihor - for keeping me awake all week!
- LTM - for a whole vat!
- Someone<sub>7</sub> - for a week of sunny mornings!
- Someone<sub>8</sub> - for a late night pick-me-up!
- Someone<sub>9</sub> - for an honest cup!
- typtre - for the scone to go with the coffee!
- Someone<sub>10</sub> - keeping me going over the weekend!
- Someone<sub>11</sub> - enough oomph for another release!

## Special Thanks
- [Cereal-Killa](https://github.com/Cereal-Killa) - for providing a solution to [Issue #28](https://github.com/WereDev/Wu10Man/issues/28) and for making a "Select All" button.
Expand All @@ -44,7 +52,9 @@ If you were running an older version of Wu10Man, don't worry, the new versions w

## Pausing Updates

A few months ago, Windows added a pause feature to some of the business license of Windows 10. Recently they added the ability to pause updates as well, but the UI only allows you to go out a few weeks. I added a screen that allows for a longer pause scenario. This isn't adding new functionality to Windows, only using the functionality that is built in. This feature will only work correctly on those versions of Windows that already support Pause/Defer.
A while ago, Windows added a pause feature to some of the business license of Windows 10. Not long after, added the ability to pause updates as well, but the UI only allows you to go out a few weeks. I added a screen that allows for a longer pause scenario. Wu10Man is NOT adding new functionality to Windows, only using the functionality that is built in. This feature will only work correctly on those versions of Windows that already support Pause/Defer.

As a note, this doesn't necessarily stop updates. Microsoft can, and has, pushed updates anyway if they deem the update important enough. I don't recommend using the Pause feature and I'll likely push it into Legacy in the near future.

## BETA - Declutter
Windows 10 comes with a lot of clutter. There's the random stuff that they install that aren't particularly necessary, and then there's the 3rd party apps that Windows tries to include. There's plenty of apps and scripts to remove a bunch of these, but I wanted to add it here as well so that I had a single solution.
Expand Down Expand Up @@ -113,4 +123,4 @@ There was a fair amount of research that went into this, but a couple sites stoo
- [Updating Scheduled Tasks w/ PowerShell](https://devblogs.microsoft.com/scripting/use-scheduled-tasks-to-run-powershell-commands-on-windows/)

## Downloads
[Wu10Man Download](https://github.com/WereDev/Wu10Man/releases)
[Wu10Man Download](https://github.com/WereDev/Wu10Man/releases)
Expand Up @@ -36,6 +36,12 @@
<CodeAnalysisRuleSet>
</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>wu10man-snk.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -47,5 +53,8 @@
<Compile Include="WindowsApiBridge.cs" />
<Compile Include="WindowsServiceBridge.cs" />
</ItemGroup>
<ItemGroup>
<None Include="wu10man-snk.pfx" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
17 changes: 10 additions & 7 deletions WereDev.Utils.Wu10Man.Core/Services/WindowsTaskManager.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using WereDev.Utils.Wu10Man.Core.Interfaces;
using WereDev.Utils.Wu10Man.Core.Interfaces.Providers;
Expand Down Expand Up @@ -55,16 +56,18 @@ public WindowsTask EnableTask(string path)

public WindowsTask[] GetTasks()
{
var tasks = new WindowsTask[_windowsTaskConfigs.Length];
for (int i = 0; i < tasks.Length; i++)
var tasks = new List<WindowsTask>();
foreach (var config in _windowsTaskConfigs)
{
var windowsTaskConfig = _windowsTaskConfigs[i];
var task = _taskProvider.GetTask(windowsTaskConfig.TaskPath);
task.Name = windowsTaskConfig.TaskName;
tasks[i] = task;
var task = _taskProvider.GetTask(config.TaskPath);
if (task == null)
continue;
var pathSplit = task.FullPath.Split('\\');
task.Name = pathSplit[pathSplit.Length - 2] + " - " + task.Name;
tasks.Add(task);
}

return tasks;
return tasks.ToArray();
}

public WindowsTask GetTask(string path)
Expand Down
7 changes: 7 additions & 0 deletions WereDev.Utils.Wu10Man.Core/WereDev.Utils.Wu10Man.Core.csproj
Expand Up @@ -35,6 +35,12 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\stylecop.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>wu10man-snk.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -103,6 +109,7 @@
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="wu10man-snk.pfx" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Expand Up @@ -35,6 +35,12 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\stylecop.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>wu10man-snk.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.9.1.0, Culture=neutral, PublicKeyToken=e25603a88b3aa7da, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.9.1\lib\net452\Microsoft.Win32.TaskScheduler.dll</HintPath>
Expand Down Expand Up @@ -100,6 +106,7 @@
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="wu10man-snk.pfx" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\stylecop.json">
Expand Down
156 changes: 156 additions & 0 deletions Wu10Man/Converters/MathConverter.cs
@@ -0,0 +1,156 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Data;

namespace WereDev.Utils.Wu10Man.Converters
{
// Does a math equation on the bound value.
// Use @VALUE in your mathEquation as a substitute for bound value
// Operator order is parenthesis first, then Left-To-Right (no operator precedence)
// https://rachel53461.wordpress.com/2011/08/20/the-math-converter/
public class MathConverter : IValueConverter
{
private static readonly char[] _allOperators = new[] { '+', '-', '*', '/', '%', '(', ')' };

private static readonly List<string> _grouping = new List<string> { "(", ")" };
private static readonly List<string> _operators = new List<string> { "+", "-", "*", "/", "%" };

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
// Parse value into equation and remove spaces
var mathEquation = parameter as string;
mathEquation = mathEquation.Replace(" ", string.Empty);
mathEquation = mathEquation.Replace("@VALUE", value?.ToString() ?? string.Empty);

// Validate values and get list of numbers in equation
var numbers = new List<double>();
foreach (string s in mathEquation.Split(_allOperators))
{
if (!string.IsNullOrEmpty(s))
{
if (double.TryParse(s, out var tmp))
{
numbers.Add(tmp);
}
else
{
// Handle Error - Some non-numeric, operator, or grouping character found in string
throw new InvalidCastException();
}
}
}

// Begin parsing method
EvaluateMathString(ref mathEquation, ref numbers, 0);

// After parsing the numbers list should only have one value - the total
return numbers[0];
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}

// Evaluates a mathematical string and keeps track of the results in a List<double> of numbers
private void EvaluateMathString(ref string mathEquation, ref List<double> numbers, int index)
{
// Loop through each mathemtaical token in the equation
string token = GetNextToken(mathEquation);

while (!string.IsNullOrEmpty(token))
{
// Remove token from mathEquation
mathEquation = mathEquation.Remove(0, token.Length);

// If token is a grouping character, it affects program flow
if (_grouping.Contains(token))
{
switch (token)
{
case "(":
EvaluateMathString(ref mathEquation, ref numbers, index);
break;

case ")":
return;
}
}

// If token is an operator, do requested operation
if (_operators.Contains(token))
{
// If next token after operator is a parenthesis, call method recursively
string nextToken = GetNextToken(mathEquation);
if (nextToken == "(")
{
EvaluateMathString(ref mathEquation, ref numbers, index + 1);
}

// Verify that enough numbers exist in the List<double> to complete the operation
// and that the next token is either the number expected, or it was a ( meaning
// that this was called recursively and that the number changed
if (numbers.Count > (index + 1) &&
(double.Parse(nextToken) == numbers[index + 1] || nextToken == "("))
{
switch (token)
{
case "+":
numbers[index] = numbers[index] + numbers[index + 1];
break;
case "-":
numbers[index] = numbers[index] - numbers[index + 1];
break;
case "*":
numbers[index] = numbers[index] * numbers[index + 1];
break;
case "/":
numbers[index] = numbers[index] / numbers[index + 1];
break;
case "%":
numbers[index] = numbers[index] % numbers[index + 1];
break;
}

numbers.RemoveAt(index + 1);
}
else
{
// Handle Error - Next token is not the expected number
throw new FormatException("Next token is not the expected number");
}
}

token = GetNextToken(mathEquation);
}
}

// Gets the next mathematical token in the equation
private string GetNextToken(string mathEquation)
{
// If we're at the end of the equation, return string.empty
if (string.IsNullOrEmpty(mathEquation))
{
return string.Empty;
}

// Get next operator or numeric value in equation and return it
string tmp = string.Empty;
foreach (char c in mathEquation)
{
if (_allOperators.Contains(c))
{
return string.IsNullOrEmpty(tmp) ? c.ToString() : tmp;
}
else
{
tmp += c;
}
}

return tmp;
}
}
}
4 changes: 2 additions & 2 deletions Wu10Man/Properties/AssemblyInfo.cs
Expand Up @@ -48,6 +48,6 @@
// 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("4.3.0.0")]
[assembly: AssemblyFileVersion("4.3.0.0")]
[assembly: AssemblyVersion("4.4.0.0")]
[assembly: AssemblyFileVersion("4.4.0.0")]
[assembly: NeutralResourcesLanguage("en-US")]
17 changes: 12 additions & 5 deletions Wu10Man/UserControls/PauseUpdatesControl.xaml
Expand Up @@ -16,12 +16,19 @@
<Label>
<Label.Content>
<StackPanel>
<TextBlock Margin="0, 0, 0, 0">
<Image Width="16" Height="16" Source="/Wu10Man;component/warning.png" />
</TextBlock>
<TextBlock FontWeight="Bold" Margin="20, -16, 0, 0" TextWrapping="Wrap">
This may not stop Windows Updates!
</TextBlock>
<TextBlock TextWrapping="Wrap">
This is new functionality introduced around early 2019.
You can gain access to these settings via the normal
Windows Update Advanced Settings. Those screens put a limit
on the amount of time you can pause updates, so I added
this functionality to bypass those limits.
This exposes a Windows Update feature that is part of Windows and is
not really a Wu10Man feature. You can gain access to
these settings via the normal Windows Update
Advanced Settings. Those screens put a limit on the
amount of time you can pause updates, so I added this
functionality to bypass those limits.
</TextBlock>
<TextBlock FontWeight="Bold" TextWrapping="Wrap" Margin="0,15,0,0">
Feature Updates:
Expand Down

0 comments on commit f7d5ed6

Please sign in to comment.