Free, open-source Windows optimization tool for performance, privacy, and simplicity.
C# csharpdebloatdotnetgamingopen-sourceoptimizationoptimizeroptimizerduckperformanceprivacytweakertweakswindowswinui
Add tweaks to DisableCopilotTweak
itsfatduck76ac0d61e618
diff --git a/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs b/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.csindex 528d334..a8ea069 100644--- a/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs+++ b/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs@@ -24,7 +24,7 @@ public static class SystemProtectionHelperWe were [{Theme.Error}]unable[/] to enable System Protection.[{Theme.Muted}]For more information, check the log file.[/]""",- new PromptOption("Try again", Theme.Warning, Enable), // Enable() trả bool+ new PromptOption("Try again", Theme.Warning, Enable),new PromptOption("Skip", Theme.Error, () => false));}diff --git a/optimizerDuck/src/Core/Optimizers/SecurityAndPrivacy.cs b/optimizerDuck/src/Core/Optimizers/SecurityAndPrivacy.csindex 00ce73e..52d93a7 100644--- a/optimizerDuck/src/Core/Optimizers/SecurityAndPrivacy.cs+++ b/optimizerDuck/src/Core/Optimizers/SecurityAndPrivacy.cs@@ -151,7 +151,7 @@ public class SecurityAndPrivacy : IOptimizationGroupif (ShellService.CMD($"schtasks /Change /TN \"{task}\" /Disable").ExitCode != 0)Log.LogError("Failed to disable task {Task}.", task);- Log.LogInformation("Disabled almost all telemetry.");+ Log.LogInformation("Disabled telemetry.");// @formatter:onreturn Task.CompletedTask;}@@ -185,7 +185,7 @@ public class SecurityAndPrivacy : IOptimizationGroupreturn Task.CompletedTask;}}-+public class DisableCopilotTweak : IOptimizationTweak{public string Name { get; } = "Disable Windows Copilot";@@ -200,8 +200,14 @@ public class SecurityAndPrivacy : IOptimizationGroupusing var tracker = ServiceTracker.Begin();RegistryService.Write(- new RegistryItem(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced",- "TurnOffWindowsCopilot", 1)+ new RegistryItem(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot", "TurnOffWindowsCopilot", 1),+ new RegistryItem(@"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsCopilot", "TurnOffWindowsCopilot", 1),+ new RegistryItem(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowCopilotButton", 0),+ new RegistryItem(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Copilot", "IsCopilotAvailable", 0),+ new RegistryItem(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Copilot", "CopilotDisabledReason", "IsEnabledForGeographicRegionFailed"),+ new RegistryItem(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsCopilot", "AllowCopilotRuntime", 0),+ new RegistryItem(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked", "{CB3B0003-8088-4EDE-8769-8B354AB2FF8C}", ""),+ new RegistryItem(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Copilot\BingChat", "IsUserEligible", 0));Log.LogInformation("Windows Copilot disabled.");