winutil icon indicating copy to clipboard operation
winutil copied to clipboard

Add option to remove Microsoft Copilot AI

Open ModernTTY opened this issue 10 months ago • 7 comments

I added the function to Remove the Microsoft Copilot AI. Besides some small problematic updates it was straightforward. Works on 23H2 build 22631.3447.

ModernTTY avatar Apr 17 '24 13:04 ModernTTY

EDIT: just wondering about your approach of removing Copilot, which's why remove it entirely? looking online and I've found a Registry Hack to turn Copilot off, so removing Copilot entirely using Remove-AppxPackage is rather an interesting approach.

My intention was to do a complete removal for privacy but I do plan adding an option for a disable in addition to removing later on.

ModernTTY avatar Apr 17 '24 14:04 ModernTTY

Have experienced problems, converting to draft

ModernTTY avatar Apr 17 '24 16:04 ModernTTY

Does the following code do anything?

if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot") -ne $true) {  New-Item "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot' -Name 'TurnOffWindowsCopilot' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;

Obegg avatar Apr 17 '24 21:04 Obegg

You might also reference this reg edit via Set-ItemProperty to disable copilot so windows won't refer to something that isn't there:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsCopilot]
"TurnOffWindowsCopilot"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot]
"TurnOffWindowsCopilot"=-

ChrisTitusTech avatar Apr 17 '24 21:04 ChrisTitusTech

Does the following code do anything?

if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot") -ne $true) {  New-Item "HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot' -Name 'TurnOffWindowsCopilot' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;

I'd use this code AND also add HKLM as well so it disables user and machine level.

ChrisTitusTech avatar Apr 17 '24 21:04 ChrisTitusTech

I'd use this code AND also add HKLM as well so it disables user and machine level.

Haven't found this policy on group policy editor for Computer Configuration, only for User Configuration so I am not sure about your suggestion...

Obegg avatar Apr 17 '24 21:04 Obegg

So this is what happened: After running tweaks in my testing and manually turning on Copilot in settings the icon didn’t appear so I made the PR. Then after opening PR I ran a security update and rebooted my computer after that is saw the Copilot icon and somehow when I pressed it it opened, the weird thing is that it still doesn’t show up in the settings app list, and doesn’t show up when running Get-AppxPackage I have a few theories on what happend.

  1. The security update partially reinstalled Copilot but didn’t install the metadata for it to show up in settings.
  2. There actually are lots of protections for Copilot specifically Windows uninstalls Copilot in RAM but when I rebooted and Windows tried to actually write the deletions it failed doing that.
  3. The Copilot files are stored somewhere in cache/temporary file but the actual files are gone.

ModernTTY avatar Apr 18 '24 11:04 ModernTTY

@ModernTTY lets push this to the next PR. I'm merging to main and this draft will be wiped out. I'm also curious to see how this performs on 24H2 as they expand Co-Pilot to infect more of Windows

ChrisTitusTech avatar Apr 20 '24 21:04 ChrisTitusTech