@@ -13,27 +13,27 @@ net session >nul 2>&1
13
13
setlocal
14
14
for /f " tokens=4-5 delims=. " %%i in ('ver') do set VERSION = %%i .%%j
15
15
if " %version% " == " 6.1" (
16
- goto admin
16
+ goto admin
17
17
) else (
18
- cls
19
- color 4f
20
- echo .
21
- echo ERROR: %name% is not compatible with this operating system.
22
- timeout /t -1
23
- exit
18
+ cls
19
+ color 4f
20
+ echo .
21
+ echo ERROR: %name% is not compatible with this operating system.
22
+ timeout /t -1
23
+ exit
24
24
)
25
25
endlocal
26
26
:admin
27
27
echo .
28
28
echo Checking permissions...
29
29
ping 127.0.0.1 -n 2 > nul
30
30
fltmc > nul 2 >& 1 || (
31
- cls
32
- color 4f
33
- echo .
34
- echo ERROR: %name% needs elevated privileges in order to make changes to your system.
35
- timeout /t -1
36
- exit
31
+ cls
32
+ color 4f
33
+ echo .
34
+ echo ERROR: %name% needs elevated privileges in order to make changes to your system.
35
+ timeout /t -1
36
+ exit
37
37
)
38
38
goto home
39
39
goto admin
@@ -59,7 +59,7 @@ echo - Remember to hide the uninstalled updates
59
59
echo A. Automatic mode: Perform all of the above tasks
60
60
echo Q. Quit
61
61
echo .
62
- set /p userchoice = TYPE AN OPTION (1-5, A, Q):
62
+ set /p userchoice = TYPE AN OPTION (1-5, A, Q):
63
63
if " %userchoice% " == " 1" goto restore
64
64
if " %userchoice% " == " 2" goto services
65
65
if " %userchoice% " == " 3" goto tasks
@@ -80,11 +80,11 @@ echo System Properties ^> System Protection ^> Configure...
80
80
echo .
81
81
wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint " Teleme7ry %scriptver% " , 100, 7
82
82
if /I " %userchoice% " == " A" (
83
- timeout /t 5
84
- goto services
83
+ timeout /t 5
84
+ goto services
85
85
) else (
86
- timeout /t -1
87
- goto home
86
+ timeout /t -1
87
+ goto home
88
88
)
89
89
:services
90
90
cls
@@ -103,11 +103,11 @@ icacls "C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtra
103
103
icacls " C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /inheritance:r /deny SYSTEM:F /grant Administrators:F
104
104
echo " " > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl
105
105
if /I " %userchoice% " == " A" (
106
- timeout /t 5
107
- goto tasks
106
+ timeout /t 5
107
+ goto tasks
108
108
) else (
109
- timeout /t -1
110
- goto home
109
+ timeout /t -1
110
+ goto home
111
111
)
112
112
:tasks
113
113
cls
@@ -136,11 +136,11 @@ icacls "C:\Windows\System32\EOSNotify.exe" /grant administrators:F
136
136
icacls " C:\Windows\System32\EOSNotify.exe" /inheritance:r /deny SYSTEM:F /grant Administrators:F
137
137
del /f " C:\Windows\System32\EOSNotify.exe"
138
138
if /I " %userchoice% " == " A" (
139
- timeout /t 5
140
- goto hosts
139
+ timeout /t 5
140
+ goto hosts
141
141
) else (
142
- timeout /t -1
143
- goto home
142
+ timeout /t -1
143
+ goto home
144
144
)
145
145
:hosts
146
146
cls
@@ -149,11 +149,11 @@ echo APPLYING HOSTS RULES...
149
149
echo ===========================================
150
150
echo .
151
151
if not exist " %~dp0 \rules.txt" (
152
- color 4f
153
- echo The rules file could not be found.
154
- echo Make sure to extract/download it alongside Teleme7ry.
155
- timeout /t -1
156
- goto home
152
+ color 4f
153
+ echo The rules file could not be found.
154
+ echo Make sure to extract/download it alongside Teleme7ry.
155
+ timeout /t -1
156
+ goto home
157
157
)
158
158
echo Merging Teleme7ry rules with system hosts...
159
159
if not exist " %~dp0 \working\" mkdir %~dp0 \working
@@ -168,13 +168,13 @@ set LF=^
168
168
169
169
170
170
> " %cleaned% " (
171
- for /f usebackq^ eol^ =^ %LF%%L F% ^ delims^ = %%A in (" %mergefile% " ) do (
172
- set " ln = %%A "
173
- setlocal enableDelayedExpansion
174
- > " %dupl% " (echo !ln:\ =\\ ! )
175
- > nul findstr /ilg:" %dupl% " " %cleaned% " || (echo !ln! )
176
- endlocal
177
- )
171
+ for /f usebackq^ eol^ =^ %LF%%L F% ^ delims^ = %%A in (" %mergefile% " ) do (
172
+ set " ln = %%A "
173
+ setlocal enableDelayedExpansion
174
+ > " %dupl% " (echo !ln:\ =\\ ! )
175
+ > nul findstr /ilg:" %dupl% " " %cleaned% " || (echo !ln! )
176
+ endlocal
177
+ )
178
178
)
179
179
> nul move /y " %cleaned% " " %~dp0 \working\hosts_clean.txt"
180
180
2 > nul del " %dupl% "
@@ -188,11 +188,11 @@ echo.
188
188
echo Flushing DNS resolver cache...
189
189
ipconfig /flushdns
190
190
if /I " %userchoice% " == " A" (
191
- timeout /t 5
192
- goto updates
191
+ timeout /t 5
192
+ goto updates
193
193
) else (
194
- timeout /t -1
195
- goto home
194
+ timeout /t -1
195
+ goto home
196
196
)
197
197
:updates
198
198
cls
@@ -310,11 +310,11 @@ wusa /uninstall /kb:971033 /quiet /norestart
310
310
echo Uninstalling KB4493132: Windows 7 End of Support nagware.
311
311
wusa /uninstall /kb:4493132 /quiet /norestart
312
312
if /I " %userchoice% " == " A" (
313
- timeout /t 5
314
- goto end
313
+ timeout /t 5
314
+ goto end
315
315
) else (
316
- timeout /t -1
317
- goto restart
316
+ timeout /t -1
317
+ goto restart
318
318
)
319
319
:restart
320
320
cls
0 commit comments