Untitled
Anonymous
PowerShell
11/08/2026 11:22 AM
1.6 KB
9
Indexable
Never
powershell -NoProfile -ExecutionPolicy Bypass -Command "$p=Join-Path $env:TEMP 'cleanup-win8.ps1'; @'
$ErrorActionPreference = 'Continue'
Write-Host 'WINDOWS 8 CLEANUP' -ForegroundColor Cyan
# Stop common disk-heavy services
$services = @{
WSearch = 'Disabled'
SysMain = 'Disabled'
BITS = 'Manual'
wuauserv = 'Manual'
}
foreach ($name in $services.Keys) {
Write-Host \"Configuring $name\"
Stop-Service -Name $name -Force -ErrorAction SilentlyContinue
Set-Service -Name $name -StartupType $services[$name] -ErrorAction SilentlyContinue
}
# Find registered antivirus and IObit uninstallers
$paths = @(
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
)
$apps = Get-ItemProperty $paths -ErrorAction SilentlyContinue |
Where-Object {
$_.DisplayName -match 'McAfee|Norton|IObit|Advanced SystemCare|Driver Booster|Malware Fighter'
} |
Sort-Object DisplayName -Unique
foreach ($app in $apps) {
Write-Host \"Uninstalling: $($app.DisplayName)\" -ForegroundColor Yellow
$cmd = $app.QuietUninstallString
if (-not $cmd) { $cmd = $app.UninstallString }
if ($cmd) {
if ($cmd -match 'MsiExec(\.exe)?') {
$cmd = $cmd -replace '/I(?=\s*[{])','/X'
}
Start-Process -FilePath 'cmd.exe' -ArgumentList '/c', $cmd -Wait
}
}
Write-Host 'Cleanup attempts completed.' -ForegroundColor Green
Write-Host 'Restart manually after checking uninstall results.'
Read-Host 'Press Enter to exit'
'@ | Set-Content -Path $p; powershell -NoProfile -ExecutionPolicy Bypass -File $p"Editor is loading...
Leave a Comment