Skip to content

Commit fcdf6b0

Browse files
committed
Format script
1 parent b208829 commit fcdf6b0

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

teleme7ry.bat

+46-46
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ net session >nul 2>&1
1313
setlocal
1414
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
1515
if "%version%" == "6.1" (
16-
goto admin
16+
goto admin
1717
) 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
2424
)
2525
endlocal
2626
:admin
2727
echo.
2828
echo Checking permissions...
2929
ping 127.0.0.1 -n 2 > nul
3030
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
3737
)
3838
goto home
3939
goto admin
@@ -59,7 +59,7 @@ echo - Remember to hide the uninstalled updates
5959
echo A. Automatic mode: Perform all of the above tasks
6060
echo Q. Quit
6161
echo.
62-
set /p userchoice=TYPE AN OPTION (1-5, A, Q):
62+
set /p userchoice=TYPE AN OPTION (1-5, A, Q):
6363
if "%userchoice%"=="1" goto restore
6464
if "%userchoice%"=="2" goto services
6565
if "%userchoice%"=="3" goto tasks
@@ -80,11 +80,11 @@ echo System Properties ^> System Protection ^> Configure...
8080
echo.
8181
wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "Teleme7ry %scriptver%", 100, 7
8282
if /I "%userchoice%" == "A" (
83-
timeout /t 5
84-
goto services
83+
timeout /t 5
84+
goto services
8585
) else (
86-
timeout /t -1
87-
goto home
86+
timeout /t -1
87+
goto home
8888
)
8989
:services
9090
cls
@@ -103,11 +103,11 @@ icacls "C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtra
103103
icacls "C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /inheritance:r /deny SYSTEM:F /grant Administrators:F
104104
echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl
105105
if /I "%userchoice%" == "A" (
106-
timeout /t 5
107-
goto tasks
106+
timeout /t 5
107+
goto tasks
108108
) else (
109-
timeout /t -1
110-
goto home
109+
timeout /t -1
110+
goto home
111111
)
112112
:tasks
113113
cls
@@ -136,11 +136,11 @@ icacls "C:\Windows\System32\EOSNotify.exe" /grant administrators:F
136136
icacls "C:\Windows\System32\EOSNotify.exe" /inheritance:r /deny SYSTEM:F /grant Administrators:F
137137
del /f "C:\Windows\System32\EOSNotify.exe"
138138
if /I "%userchoice%" == "A" (
139-
timeout /t 5
140-
goto hosts
139+
timeout /t 5
140+
goto hosts
141141
) else (
142-
timeout /t -1
143-
goto home
142+
timeout /t -1
143+
goto home
144144
)
145145
:hosts
146146
cls
@@ -149,11 +149,11 @@ echo APPLYING HOSTS RULES...
149149
echo ===========================================
150150
echo.
151151
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
157157
)
158158
echo Merging Teleme7ry rules with system hosts...
159159
if not exist "%~dp0\working\" mkdir %~dp0\working
@@ -168,13 +168,13 @@ set LF=^
168168

169169

170170
>"%cleaned%" (
171-
for /f usebackq^ eol^=^%LF%%LF%^ 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%%LF%^ 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+
)
178178
)
179179
>nul move /y "%cleaned%" "%~dp0\working\hosts_clean.txt"
180180
2>nul del "%dupl%"
@@ -188,11 +188,11 @@ echo.
188188
echo Flushing DNS resolver cache...
189189
ipconfig /flushdns
190190
if /I "%userchoice%" == "A" (
191-
timeout /t 5
192-
goto updates
191+
timeout /t 5
192+
goto updates
193193
) else (
194-
timeout /t -1
195-
goto home
194+
timeout /t -1
195+
goto home
196196
)
197197
:updates
198198
cls
@@ -310,11 +310,11 @@ wusa /uninstall /kb:971033 /quiet /norestart
310310
echo Uninstalling KB4493132: Windows 7 End of Support nagware.
311311
wusa /uninstall /kb:4493132 /quiet /norestart
312312
if /I "%userchoice%" == "A" (
313-
timeout /t 5
314-
goto end
313+
timeout /t 5
314+
goto end
315315
) else (
316-
timeout /t -1
317-
goto restart
316+
timeout /t -1
317+
goto restart
318318
)
319319
:restart
320320
cls

0 commit comments

Comments
 (0)