<# .SYNOPSIS Script Profesional de Limpieza de Rastros, Temporales y Privacidad para Windows 10/11. .DESCRIPTION Elimina temporales, cachés de navegadores, historiales de reproductores multimedia, registros de MS Paint, app Fotos, accesos recientes, portapapeles y papelera de reciclaje. .NOTES Autor: Proyecto WinPrivacy-Cleaner Licencia: MIT #> # Requerir permisos de Administrador #Requires -RunAsAdministrator [CmdletBinding()] Param() # Configuración de apariencia $Host.UI.RawUI.WindowTitle = "Limpieza Profunda de Privacidad y Sistema" Clear-Host Write-Host "============================================================" -ForegroundColor Green Write-Host " Iniciando proceso de limpieza profunda y privacidad " -ForegroundColor Green Write-Host "============================================================" -ForegroundColor Green Write-Host "" # Función auxiliar para cerrar procesos de forma segura function Stop-ProcessIfRunning { param ([string]$ProcessName) $proc = Get-Process -Name $ProcessName -ErrorAction SilentlyContinue if ($proc) { Write-Host "[+] Cerrando proceso: $ProcessName..." -ForegroundColor Yellow Stop-Process -Name $ProcessName -Force -ErrorAction SilentlyContinue } } # 1. Cerrar Navegadores, Reproductores y Apps Write-Host "[1/10] Deteniendo aplicaciones activas..." -ForegroundColor Cyan $processesToClose = @( "chrome", "msedge", "firefox", "brave", "mullvadbrowser", "mspaint", "Microsoft.Photos", "vlc", "mpc-hc", "mpc-hc64", "mpc-be", "mpc-be64", "PotPlayerMini64", "KMPlayer", "GOM", "aimp", "mpv", "wmplayer", "realplay", "bsplayer" ) foreach ($proc in $processesToClose) { Stop-ProcessIfRunning -ProcessName $proc } # 2. Limpieza de Navegadores basados en Chromium (Chrome, Edge, Brave) Write-Host "[2/10] Limpiando caché de navegadores Chromium..." -ForegroundColor Cyan $chromiumPaths = @( "$env:LOCALAPPDATA\Google\Chrome\User Data\Default", "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default", "$env:LOCALAPPDATA\BraveSoftware\Brave-Browser\User Data\Default" ) foreach ($path in $chromiumPaths) { if (Test-Path $path) { Remove-Item -Path "$path\Cache\*" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path "$path\Code Cache\*" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path "$path\GPUCache\*" -Recurse -Force -ErrorAction SilentlyContinue } } # 3. Limpieza de Navegadores Gecko (Firefox y Mullvad) Write-Host "[3/10] Limpiando caché de navegadores Gecko..." -ForegroundColor Cyan $geckoPaths = @( "$env:LOCALAPPDATA\Mozilla\Firefox\Profiles\*\cache2", "$env:LOCALAPPDATA\MullvadBrowser\Profiles\*\cache2" ) foreach ($pattern in $geckoPaths) { Get-Item -Path $pattern -ErrorAction SilentlyContinue | ForEach-Object { Remove-Item -Path "$_\*" -Recurse -Force -ErrorAction SilentlyContinue } } # 4. Limpieza Ampliada de Reproductores Multimedia (VLC, MPC, PotPlayer, KMPlayer, GOM, AIMP, MPV, WMP, RealPlayer, BS.Player) Write-Host "[4/10] Limpiando registros de reproductores multimedia..." -ForegroundColor Cyan # VLC if (Test-Path "$env:APPDATA\vlc") { Remove-Item -Path "$env:APPDATA\vlc\art\*" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path "$env:APPDATA\vlc\vlc-qt-interface.ini" -Force -ErrorAction SilentlyContinue } # Claves de Registro (MPC, PotPlayer, KMPlayer, GOM, WMP, RealPlayer y BS.Player) $mediaPlayerRegKeys = @( "HKCU:\Software\MPC-HC\MPC-HC\Recent File List", "HKCU:\Software\MPC-HC\MPC-HC\Recent URL List", "HKCU:\Software\MPC-BE\MPC-BE\Recent File List", "HKCU:\Software\Gabest\Media Player Classic\Recent File List", "HKCU:\Software\Daum\PotPlayerMini64\v2\Personal\Recent", "HKCU:\Software\KMPlayer\KMP3.0\OptionArea", "HKCU:\Software\GRETECH\GomPlayer\OPTION", "HKCU:\Software\Microsoft\MediaPlayer\Player\RecentFileList", "HKCU:\Software\Microsoft\MediaPlayer\Player\RecentURLList", "HKCU:\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips", "HKCU:\Software\BSplayer\BSplayer\Recent" ) foreach ($key in $mediaPlayerRegKeys) { if (Test-Path $key) { Remove-Item -Path $key -Recurse -Force -ErrorAction SilentlyContinue } } # Carpetas de datos y caché en AppData (AIMP, MPV, 5KPlayer, RealPlayer y BS.Player) $mediaPlayerPaths = @( "$env:APPDATA\AIMP\PLST", "$env:APPDATA\mpv\watch_later", "$env:LOCALAPPDATA\5KPlayer\Cache", "$env:APPDATA\Real\RealPlayer\History", "$env:APPDATA\BSplayer" ) foreach ($path in $mediaPlayerPaths) { if (Test-Path $path) { Remove-Item -Path "$path\*" -Recurse -Force -ErrorAction SilentlyContinue } } # 5. Limpieza de App Fotos de Microsoft Write-Host "[5/10] Limpiando datos temporales de la app Fotos..." -ForegroundColor Cyan $photosPath = "$env:LOCALAPPDATA\Packages\Microsoft.Windows.Photos_8wekyb3d8bbwe" if (Test-Path $photosPath) { Remove-Item -Path "$photosPath\LocalState\*" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path "$photosPath\LocalCache\*" -Recurse -Force -ErrorAction SilentlyContinue } # 6. Limpieza de Historial de MS Paint (Registro) Write-Host "[6/10] Limpiando historial de archivos recientes de MS Paint..." -ForegroundColor Cyan $paintRegKeys = @( "HKCU:\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List", "HKCU:\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent Files" ) foreach ($key in $paintRegKeys) { if (Test-Path $key) { Remove-Item -Path $key -Recurse -Force -ErrorAction SilentlyContinue } } # 7. Portapapeles y Caché de Miniaturas Write-Host "[7/10] Limpiando Portapapeles y caché de miniaturas..." -ForegroundColor Cyan Set-Clipboard -Value $null -ErrorAction SilentlyContinue Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db" -Force -ErrorAction SilentlyContinue # 8. Carpetas Temporales y Prefetch Write-Host "[8/10] Limpiando carpetas Temp del Sistema, Usuario y Prefetch..." -ForegroundColor Cyan $tempFolders = @( "C:\Windows\Temp", $env:TEMP, "C:\Windows\Prefetch" ) foreach ($folder in $tempFolders) { if (Test-Path $folder) { Get-ChildItem -Path $folder -Recurse -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue } } # 9. Accesos Recientes, Jump Lists y Reinicio del Explorador Write-Host "[9/10] Limpiando accesos recientes (Recent) y Jump Lists..." -ForegroundColor Cyan Stop-ProcessIfRunning -ProcessName "explorer" $recentPath = "$env:APPDATA\Microsoft\Windows\Recent" if (Test-Path $recentPath) { Get-ChildItem -Path $recentPath -Recurse -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue } Start-Process "explorer.exe" # 10. Vaciar Papelera de Reciclaje Write-Host "[10/10] Vaciando la Papelera de reciclaje..." -ForegroundColor Cyan Clear-RecycleBin -Force -ErrorAction SilentlyContinue Write-Host "" Write-Host "============================================================" -ForegroundColor Green Write-Host " Proceso de limpieza completado con éxito. " -ForegroundColor Green Write-Host "============================================================" -ForegroundColor Green Write-Host ""