remove copilot update in edgeupdate dir

This commit is contained in:
zoicware
2025-12-10 15:00:23 -05:00
committed by GitHub
parent d94cb3d519
commit 6854c9b176

View File

@@ -1411,6 +1411,18 @@ function Remove-AI-Files {
}
#remove copilot update in edge update dir
$dir = "${env:ProgramFiles(x86)}\Microsoft\EdgeUpdate"
if (Test-Path $dir) {
$paths = Get-ChildItem $dir -Recurse -Filter '*CopilotUpdate.exe*'
foreach ($path in $paths) {
if (Test-Path $path.FullName) {
Remove-Item $path.FullName -Force
}
}
}
Reg.exe delete 'HKLM\SOFTWARE\Microsoft\EdgeUpdate' /v 'CopilotUpdatePath' /f *>$null
#remove additional installers
$inboxapps = 'C:\Windows\InboxApps'
$installers = Get-ChildItem -Path $inboxapps -Filter '*Copilot*'