forked from ionuttbara/windows-defender-remover
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScript_Run.bat
More file actions
82 lines (66 loc) · 2.22 KB
/
Script_Run.bat
File metadata and controls
82 lines (66 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@set defenderremoverver=13.0
@setlocal DisableDelayedExpansion
@echo off
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Requesting Administrator privileges...
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
pushd "%CD%"
CD /D "%~dp0"
:: Arguments Section
IF "%1"== "y" GOTO :removedef
IF "%1"== "Y" GOTO :removedef
IF "%1"== "a" GOTO :removeantivirus
IF "%1"== "A" GOTO :removeantivirus
:--------------------------------------
:--------------------------------------
cls
echo ------ Defender Remover Script , version %defenderremoverver% ------
echo Select an option:
echo.
echo Do you want to remove Windows Defender and alongside components? After this you'll need to reboot.
echo A backup and/or System Restore point is recommended.
echo [Y] Remove Windows Defender Antivirus + Windows Security App
echo [A] Remove Windows Defender Antivirus App (keeps Windows Security App, it will be back if you update)
echo [S] Remove Defender Files (if you removed antivirus first)
choice /C:yas /N
if errorlevel==3 goto removalfiles
if errorlevel==2 goto removeantivirus
if errorlevel==1 goto removedef
:--------------------------------------
:--------------------------------------
:removalfiles
PowerRun cmd.exe /k files_removal.bat
pause
:--------------------------------------
:--------------------------------------
goto :eof
:--------------------------------------
:--------------------------------------
:removedef
CLS
CLS
echo Removing Windows Security UWP App...
Powerrun powershell.exe -noprofile -executionpolicy bypass -file "RemoveSecHealthApp.ps1"
CLS
echo Unregister Windows Defender Security Components...
FOR /R %%f IN (Remove_defender\*.reg) DO PowerRun.exe regedit.exe /s "%%f"
FOR /R %%f IN (Remove_defender\*.reg) DO regedit.exe /s "%%f"
FOR /R %%f IN (Remove_SecurityComp\*.reg) DO PowerRun.exe regedit.exe /s "%%f"
timeout 3
shutdown /r /f /t 10
exit
:--------------------------------------
:--------------------------------------
:removeantivirus
CLS
echo Removing Windows Security UWP App...
FOR /R %%f IN (Remove_defender\*.reg) DO PowerRun.exe regedit.exe /s "%%f"
FOR /R %%f IN (Remove_defender\*.reg) DO regedit.exe /s "%%f"
CLS
timeout 3
shutdown /r /f /t 10
exit
:--------------------------------------