Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

feat(optimizations): add Impact

itsfatduck5adcc054cbb1
diff --git a/optimizerDuck/src/Core/Helpers/SystemHelper.cs b/optimizerDuck/src/Core/Helpers/SystemHelper.cs
index ac98697..f7f3956 100644
--- a/optimizerDuck/src/Core/Helpers/SystemHelper.cs
+++ b/optimizerDuck/src/Core/Helpers/SystemHelper.cs
@@ -76,18 +76,11 @@ public static class SystemHelper
public static void AddToExclusions(List<string> paths)
{
- try
- {
- using var tracker = ServiceTracker.Begin(Log);
- foreach (var path in paths)
- {
- var result = ShellService.PowerShell($"Add-MpPreference -ExclusionPath \"{path}\"");
- if (result.ExitCode != 0) Log.LogError($"[{Theme.Error}]Failed to add path to exclusions: {path}[/]");
- }
- }
- catch (Exception ex)
+ using var tracker = ServiceTracker.Begin(Log);
+ foreach (var path in paths)
{
- Log.LogError(ex, "Failed to add paths to exclusions.");
+ var result = ShellService.PowerShell($"Add-MpPreference -ExclusionPath \"{path}\"");
+ if (result.ExitCode != 0) Log.LogError($"[{Theme.Error}]Failed to add path to exclusions: {path}[/]");
}
}
}
\ No newline at end of file
diff --git a/optimizerDuck/src/Interfaces/IOptimizationTweak.cs b/optimizerDuck/src/Interfaces/IOptimizationTweak.cs
index 91ccb1e..1d852f1 100644
--- a/optimizerDuck/src/Interfaces/IOptimizationTweak.cs
+++ b/optimizerDuck/src/Interfaces/IOptimizationTweak.cs
@@ -1,4 +1,5 @@
using optimizerDuck.Core.Services;
+using optimizerDuck.Models;
namespace optimizerDuck.Interfaces;
@@ -7,5 +8,6 @@ public interface IOptimizationTweak
public string Name { get; }
public string Description { get; }
public bool EnabledByDefault { get; }
+ public OptimizationImpact Impact { get; }
public Task Apply(SystemSnapshot s);
}
\ No newline at end of file
diff --git a/optimizerDuck/src/Models/OptimizationImpact.cs b/optimizerDuck/src/Models/OptimizationImpact.cs
new file mode 100644
index 0000000..bda92ec
--- /dev/null
+++ b/optimizerDuck/src/Models/OptimizationImpact.cs
@@ -0,0 +1,9 @@
+namespace optimizerDuck.Models;
+
+public enum OptimizationImpact
+{
+ Low,
+ Medium,
+ High,
+ Critical
+}