Skip to content

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

Add tweaks to DisableCopilotTweak

itsfatduck76ac0d61e618
diff --git a/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs b/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs
index 528d334..a8ea069 100644
--- a/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs
+++ b/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs
@@ -24,7 +24,7 @@ public static class SystemProtectionHelper
We 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.cs
index 00ce73e..52d93a7 100644
--- a/optimizerDuck/src/Core/Optimizers/SecurityAndPrivacy.cs
+++ b/optimizerDuck/src/Core/Optimizers/SecurityAndPrivacy.cs
@@ -151,7 +151,7 @@ public class SecurityAndPrivacy : IOptimizationGroup
if (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:on
return Task.CompletedTask;
}
@@ -185,7 +185,7 @@ public class SecurityAndPrivacy : IOptimizationGroup
return Task.CompletedTask;
}
}
-
+
public class DisableCopilotTweak : IOptimizationTweak
{
public string Name { get; } = "Disable Windows Copilot";
@@ -200,8 +200,14 @@ public class SecurityAndPrivacy : IOptimizationGroup
using 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.");