From 2671c8b256c28677d9e4f04077880a1e47c90929 Mon Sep 17 00:00:00 2001 From: zoicware <118035521+zoicware@users.noreply.github.com> Date: Wed, 26 Jun 2024 20:58:05 -0400 Subject: [PATCH] Remove Hidden Copilot Installer --- RemoveAi.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/RemoveAi.ps1 b/RemoveAi.ps1 index d41ba15..99b1a0f 100644 --- a/RemoveAi.ps1 +++ b/RemoveAi.ps1 @@ -105,6 +105,26 @@ foreach ($Path in $packagesPath) { Remove-FileZ -Path $Path -Recurse *>$null } +#remove package installers in edge dir +#installs Microsoft.Windows.Ai.Copilot.Provider +$dir = "${env:ProgramFiles(x86)}\Microsoft" +$folders = @( + 'Edge', + 'EdgeCore', + 'EdgeWebView' +) +foreach ($folder in $folders) { + if ($folder -eq 'EdgeCore') { + #edge core doesnt have application folder + $fullPath = (Get-ChildItem -Path "$dir\$folder\*.*.*.*\copilot_provider_msix" -ErrorAction SilentlyContinue).FullName + + } + else { + $fullPath = (Get-ChildItem -Path "$dir\$folder\Application\*.*.*.*\copilot_provider_msix" -ErrorAction SilentlyContinue).FullName + } + if ($fullPath -ne $null) { Remove-Item -Path $fullPath -Recurse -Force -ErrorAction SilentlyContinue } +} + #remove any screenshots from recall Write-Host 'Removing Any Screenshots...' Remove-Item -Path "$env:LOCALAPPDATA\CoreAIPlatform*" -Force -Recurse -ErrorAction SilentlyContinue