@@ -34,26 +34,25 @@ timeout /t 2 >nul
3434echo ==============================================================
3535echo 03. DEFENDER
3636echo ==============================================================
37- :: 2. Desactivación de Servicios y Drivers
3837echo [+] Deshabilitando servicios y drivers de Kernel...
3938set " list = WinDefend WdFilters WdBoot WdNisDrv WdNisSvc Sense SecurityHealthService wscsvc"
40- for %%s in (%list% ) do (
41- reg add " HKLM\SYSTEM\CurrentControlSet\Services\%%s " /v " Start" /t REG_DWORD /d 4 /f > nul 2 >& 1
42- )
39+ for %%s in (%list% ) do ( reg add " HKLM\SYSTEM\CurrentControlSet\Services\%%s " /v " Start" /t REG_DWORD /d 4 /f > nul 2 >& 1 )
4340
44- :: 3. Eliminación de la Interfaz (Versión Blindada para CMD)
4541echo [+] Eliminando App de Seguridad (SecHealthUI)...
46- powershell -NoProfile -ExecutionPolicy Bypass -Command " $appxpackage = Get-AppxPackage -AllUsers; $store = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore'; $users = @('S-1-5-18'); if (Test-Path $store) {$users += $((Get-ChildItem $store -ErrorAction SilentlyContinue | Where-Object {$_.Name -like '*S-1-5-21*'}).PSChildName)}; foreach ($appx in $($appxpackage | Where-Object {$_.Name -like '*SecHealthUI*'})) { $PackageFullName = $appx.PackageFullName; $PackageFamilyName = $appx.PackageFamilyName; dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0; Remove-AppxPackage -Package $PackageFullName -AllUsers; Write-Host ('Eliminado: ' + $PackageFullName) -ForegroundColor Cyan }"
42+ :: TODO EL COMANDO EN UNA SOLA LÍNEA PARA EVITAR QUE CMD SE ROMPA:
43+ powershell -NoProfile -ExecutionPolicy Bypass -Command " $appx = Get-AppxPackage -AllUsers *SecHealthUI*; if ($appx) { $PackageFamilyName = $appx.PackageFamilyName; dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0; Remove-AppxPackage -Package $appx.PackageFullName -AllUsers; Write-Host 'Eliminado: SecHealthUI' -ForegroundColor Green } else { Write-Host 'SecHealthUI no encontrada.' -ForegroundColor Yellow }"
4744
48- :: 4. Borrado Físico de Carpetas
4945echo [+] Forzando eliminacion de carpetas de programa...
50- :: (Sigue el resto del script...)
51-
52- :: 5. Políticas de Grupo y Tareas Programadas
53- echo [+] Aplicando bloqueos finales y limpiando tareas...
54- reg add " HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v " DisableAntiSpyware" /t REG_DWORD /d 1 /f > nul 2 >& 1
55- reg add " HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v " DisableRealtimeMonitoring" /t REG_DWORD /d 1 /f > nul 2 >& 1
46+ for %%d in (" C:\ProgramData\Microsoft\Windows Defender" " C:\Program Files\Windows Defender" " C:\Program Files (x86)\Windows Defender" " C:\Program Files\Windows Defender Advanced Threat Protection" ) do (
47+ if exist " %%~d " (
48+ echo Borrando %%~d ...
49+ takeown /f " %%~d " /r /d y > nul 2 >& 1
50+ icacls " %%~d " /grant administrators:F /t > nul 2 >& 1
51+ rd /s /q " %%~d " > nul 2 >& 1
52+ )
53+ )
5654
55+ echo [+] Limpiando tareas programadas...
5756schtasks /delete /tn " Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /f > nul 2 >& 1
5857schtasks /delete /tn " Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /f > nul 2 >& 1
5958schtasks /delete /tn " Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /f > nul 2 >& 1
0 commit comments