Skip to content

Commit 0991b6a

Browse files
authored
Update ver 4.7
- Added: Reset Network Settings in Extras - Added extra system values and apps to clean cache and logs - Added colored logs - Small improvements
1 parent 52873d0 commit 0991b6a

File tree

1 file changed

+173
-32
lines changed

1 file changed

+173
-32
lines changed

ET-AIO.bat

Lines changed: 173 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ if '%errorlevel%' NEQ '0' (
3333
:: https://github.com/semazurek/ET-All-in-One-Optimizer
3434
:: https://www.paypal.com/paypalme/rikey
3535

36-
set version=E.T. ver 4.6
36+
set version=E.T. ver 4.7
3737
title %version%
38-
38+
::mode con cols=72 lines=30
3939
set /a counter=1
4040
set /a alltodo=0
41-
:: alltodo all 66
41+
:: alltodo all 71
4242

4343
::First Admin Check
4444
NET SESSION >nul 2>&1
@@ -62,6 +62,8 @@ powershell (New-Object -ComObject Wscript.Shell).Popup("""%announcement%""",0,""
6262
:: Checks if it is running as administrator if not quit
6363
exit
6464

65+
66+
6567
:: GUI Window Form
6668
:GUIChoice
6769
:: Cleaning help files
@@ -286,14 +288,15 @@ echo $extraFormB7 = New-Object System.Windows.Forms.Button;
286288
echo $extraFormB8 = New-Object System.Windows.Forms.Button;
287289
echo $extraFormB9 = New-Object System.Windows.Forms.Button;
288290
echo $extraFormB10 = New-Object System.Windows.Forms.Button;
291+
echo $extraFormB11 = New-Object System.Windows.Forms.Button;
289292
echo $extraForm.MinimizeBox = $false;
290293
echo $extraForm.MaximizeBox = $false;
291294
echo $extraForm.TopMost = $true;
292295
echo $extraForm.AutoSizeMode = 'GrowAndShrink';
293296
echo $extraForm.FormBorderStyle = 'FixedDialog';
294297
echo $extraForm.AcceptButton = $extraFormExit;
295298
echo $extraForm.CancelButton = $extraFormExit;
296-
echo $extraForm.ClientSize = '200, 330';
299+
echo $extraForm.ClientSize = '200, 360';
297300
echo $extraForm.ShowInTaskBar = $false;
298301

299302
echo $extraForm.Location = ^(30,30^);
@@ -360,6 +363,12 @@ echo $extraFormB10.Text = 'Event Viewer';
360363
echo $extraFormB10.add_click^({eventvwr.msc}^);
361364
echo $extraForm.Controls.Add^($extraFormB10^);
362365

366+
echo $extraFormB11.Location = '25, 315';
367+
echo $extraFormB11.Size = New-Object Drawing.Point 150,25;
368+
echo $extraFormB11.Text = 'Reset Network';
369+
echo $extraFormB11.add_click^({start restart-network-settings.bat}^);
370+
echo $extraForm.Controls.Add^($extraFormB11^);
371+
363372
echo [void]$extraForm.ShowDialog^(^)
364373
echo };
365374

@@ -383,17 +392,36 @@ echo ^(addMenuItem -ParentItem ^([ref]$mainMenu^) -ItemName 'mnuFile' -ItemText
383392
echo $form.ShowDialog^(^);
384393
)>GUI.ps1
385394

395+
:: Restart Network Settings Module (Extras)
396+
echo netsh winsock reset > restart-network-settings.bat
397+
echo netsh int ipv4 reset >> restart-network-settings.bat
398+
echo netsh int ipv6 reset >> restart-network-settings.bat
399+
echo ipconfig /release >> restart-network-settings.bat
400+
echo ipconfig /renew >> restart-network-settings.bat
401+
echo ipconfig /flushdns >> restart-network-settings.bat
402+
403+
echo for /f "tokens=3,*" %%i in ('netsh int show interface^|find "Connected"') do ( >> restart-network-settings.bat
404+
echo netsh int set interface name="%%j" admin="disabled" >> restart-network-settings.bat
405+
echo netsh int set interface name="%%j" admin="enabled" >> restart-network-settings.bat
406+
echo ) >> restart-network-settings.bat
407+
386408
::Force PS authorization for scripts
387409
Powershell -Command "set-executionpolicy remotesigned"
388410
cls
389411
echo Selection window has been initiated
390412
Powershell -Command ".\GUI.ps1 %version%" >nul 2>nul
391413

414+
:: Cleaning GUI windows form file after usage
415+
if exist GUI.ps1 del GUI.ps1 /F /Q>nul 2>nul
416+
417+
:: Cleaning Restart Network Settings Module file after usage
418+
if exist restart-network-settings.bat del restart-network-settings.bat /F /Q>nul 2>nul
419+
392420
if not exist %programdata%\*.lbool exit.
393421
:: if not chosen any option = no .lbool files in programdata = exit
394422

395423
if exist %programdata%\etadblock.lbool set /a alltodo+=1
396-
if exist %programdata%\etcleaning.lbool set /a alltodo+=3
424+
if exist %programdata%\etcleaning.lbool set /a alltodo+=8
397425
if exist %programdata%\etstartup.lbool set /a alltodo+=1
398426
if exist %programdata%\etbloatware.lbool set /a alltodo+=1
399427
if exist %programdata%\etservices.lbool set /a alltodo+=2
@@ -405,9 +433,6 @@ if exist %programdata%\etonedrive.lbool set /a alltodo+=1
405433
if exist %programdata%\etxbxservices.lbool set /a alltodo+=1
406434
if exist %programdata%\etdnsone.lbool set /a alltodo+=1
407435

408-
:: Cleaning GUI windows form file after usage
409-
if exist GUI.ps1 del GUI.ps1 >nul 2>nul
410-
411436
:: BackUp/Restore Point First Time Run Asking
412437
:RestorePoint
413438
cls
@@ -1009,31 +1034,19 @@ if not exist %programdata%\etcleaning.lbool goto SkipCleaning
10091034

10101035
:: TEMP/Logs/Cache/Prefetch/Updates Cleaning
10111036
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1012-
powershell -Command "Write-Host ' [Clean] Temp ' -F darkgreen -B black"
1037+
powershell -Command "Write-Host ' [Clean] Temp ' -F yellow -B black"
10131038
Del /S /F /Q %temp% >nul 2>nul
10141039
Del /S /F /Q %Windir%\Temp >nul 2>nul
10151040

10161041
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1017-
powershell -Command "Write-Host ' [Clean] Windows Update downloads ' -F darkgreen -B black"
1042+
powershell -Command "Write-Host ' [Clean] Windows Update Downloads ' -F yellow -B black"
10181043
Del /S /F /Q %windir%\SoftwareDistribution\Download >nul 2>nul
1044+
Del /S /F /Q %WinDir%\Logs\WindowsUpdate >nul 2>nul
10191045

10201046
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1021-
powershell -Command "Write-Host ' [Clean] Prefetch/Cache/Logs ' -F darkgreen -B black"
1047+
powershell -Command "Write-Host ' [Clean] Windows Prefetch/Cache/Logs ' -F yellow -B black"
10221048
Del /S /F /Q %windir%\Prefetch >nul 2>nul
10231049

1024-
del %AppData%\Origin\Telemetry /F /Q /S >nul 2>nul
1025-
del %AppData%\Origin\Logs /F /Q /S >nul 2>nul
1026-
del %AppData%\Origin\NucleusCache /F /Q /S >nul 2>nul
1027-
del %AppData%\Origin\ConsolidatedCache /F /Q /S >nul 2>nul
1028-
del %AppData%\Origin\CatalogCache /F /Q /S >nul 2>nul
1029-
del %localAppData%\Origin\ThinSetup /F /Q /S >nul 2>nul
1030-
del %AppData%\Origin\Telemetry /F /Q /S >nul 2>nul
1031-
del %localAppData%\Origin\Logs /F /Q /S >nul 2>nul
1032-
1033-
del %localAppData%\Battle.net\Cache /F /Q /S >nul 2>nul
1034-
del %AppData%\Battle.net\Logs /F /Q /S >nul 2>nul
1035-
del %AppData%\Battle.net\Errors /F /Q /S >nul 2>nul
1036-
10371050
del %AppData%\vstelemetry >nul 2>nul
10381051
del %LocalAppData%\Microsoft\VSApplicationInsights /F /Q /S >nul 2>nul
10391052
del %ProgramData%\Microsoft\VSApplicationInsights /F /Q /S >nul 2>nul
@@ -1045,13 +1058,6 @@ del %Temp%\VSRemoteControl /F /Q /S >nul 2>nul
10451058
del %Temp%\VSTelem /F /Q /S >nul 2>nul
10461059
del %Temp%\VSTelem.Out /F /Q /S >nul 2>nul
10471060

1048-
del %localappdata%\EpicGamesLauncher\Saved\Logs /F /Q /S >nul 2>nul
1049-
del %localappdata%\CrashReportClient\Saved\Logs /F /Q /S >nul 2>nul
1050-
1051-
del %localappdata%\Steam\htmlcache\Code Cache /F /Q /S >nul 2>nul
1052-
del %localappdata%\Steam\htmlcache\GPUCache /F /Q /S >nul 2>nul
1053-
del %localappdata%\Steam\htmlcache\Cache /F /Q /S >nul 2>nul
1054-
10551061
del %localappdata%\Yarn\Cache /F /Q /S >nul 2>nul
10561062

10571063
del %appdata%\Microsoft\Teams\Cache /F /Q /S >nul 2>nul
@@ -1061,6 +1067,53 @@ del %programdata%\GOG.com\Galaxy\logs /F /Q /S >nul 2>nul
10611067

10621068
del %localappdata%\Microsoft\Windows\WebCache /F /Q /S >nul 2>nul
10631069

1070+
del "%SystemDrive%\*.log" /F /Q >nul 2>nul
1071+
del "%WinDir%\Directx.log" /F /Q >nul 2>nul
1072+
del "%WinDir%\SchedLgU.txt" /F /Q >nul 2>nul
1073+
del "%WinDir%\*.log" /F /Q >nul 2>nul
1074+
del "%WinDir%\security\logs\*.old" /F /Q >nul 2>nul
1075+
del "%WinDir%\security\logs\*.log" /F /Q >nul 2>nul
1076+
del "%WinDir%\Debug\*.log" /F /Q >nul 2>nul
1077+
del "%WinDir%\Debug\UserMode\*.bak" /F /Q >nul 2>nul
1078+
del "%WinDir%\Debug\UserMode\*.log" /F /Q >nul 2>nul
1079+
del "%WinDir%\*.bak" /F /Q >nul 2>nul
1080+
del "%WinDir%\system32\wbem\Logs\*.log" /F /Q >nul 2>nul
1081+
del "%WinDir%\OEWABLog.txt" /F /Q >nul 2>nul
1082+
del "%WinDir%\setuplog.txt" /F /Q >nul 2>nul
1083+
del "%WinDir%\Logs\DISM\*.log" /F /Q >nul 2>nul
1084+
del "%WinDir%\*.log.txt" /F /Q >nul 2>nul
1085+
del "%WinDir%\APPLOG\*.*" /F /Q >nul 2>nul
1086+
del "%WinDir%\system32\wbem\Logs\*.log" /F /Q >nul 2>nul
1087+
del "%WinDir%\system32\wbem\Logs\*.lo_" /F /Q >nul 2>nul
1088+
del "%WinDir%\Logs\DPX\*.log" /F /Q >nul 2>nul
1089+
del "%WinDir%\ServiceProfiles\NetworkService\AppData\Local\Temp\*.log" /F /Q >nul 2>nul
1090+
del "%WinDir%\Logs\*.log" /F /Q >nul 2>nul
1091+
del "%LocalAppData%\Microsoft\Windows\WindowsUpdate.log" /F /Q >nul 2>nul
1092+
del "%LocalAppData%\Microsoft\Windows\WebCache\*.log" /F /Q >nul 2>nul
1093+
del "%WinDir%\Panther\cbs.log" /F /Q >nul 2>nul
1094+
del "%WinDir%\Panther\DDACLSys.log" /F /Q >nul 2>nul
1095+
del "%WinDir%\repair\setup.log" /F /Q >nul 2>nul
1096+
del "%WinDir%\Panther\UnattendGC\diagerr.xml" /F /Q >nul 2>nul
1097+
del "%WinDir%\Panther\UnattendGC\diagwrn.xml" /F /Q >nul 2>nul
1098+
del "%WinDir%\inf\setupapi.offline.log" /F /Q >nul 2>nul
1099+
del "%WinDir%\inf\setupapi.app.log" /F /Q >nul 2>nul
1100+
del "%WinDir%\debug\WIA\*.log" /F /Q >nul 2>nul
1101+
del "%SystemDrive%\PerfLogs\System\Diagnostics\*.*" /F /Q >nul 2>nul
1102+
del "%WinDir%\Logs\CBS\*.cab" /F /Q >nul 2>nul
1103+
del "%WinDir%\Logs\CBS\*.cab" /F /Q >nul 2>nul
1104+
del "%WinDir%\Logs\WindowsBackup\*.etl" /F /Q >nul 2>nul
1105+
del "%WinDir%\System32\LogFiles\HTTPERR\*.*" /F /Q >nul 2>nul
1106+
del "%WinDir%\SysNative\SleepStudy\*.etl" /F /Q >nul 2>nul
1107+
del "%WinDir%\SysNative\SleepStudy\ScreenOn\*.etl" /F /Q >nul 2>nul
1108+
del "%WinDir%\System32\SleepStudy\*.etl" /F /Q >nul 2>nul
1109+
del "%WinDir%\System32\SleepStudy\ScreenOn\*.etl" /F /Q >nul 2>nul
1110+
del "%WinDir%\Logs" /F /Q >nul 2>nul
1111+
del "%WinDir%\DISM" /F /Q >nul 2>nul
1112+
del "%WinDir%\System32\catroot2\*.chk" /F /Q >nul 2>nul
1113+
del "%WinDir%\System32\catroot2\*.log" /F /Q >nul 2>nul
1114+
del "%WinDir%\System32\catroot2\.jrs" /F /Q >nul 2>nul
1115+
del "%WinDir%\System32\catroot2\*.txt" /F /Q >nul 2>nul
1116+
10641117
:: Cleaning Disk - cleanmgr
10651118
start cleanmgr.exe /autoclean
10661119

@@ -1071,6 +1124,94 @@ start CCleaner.exe /AUTO
10711124

10721125
:NoCC
10731126

1127+
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1128+
powershell -Command "Write-Host ' [Clean] Games Platforms Cache/Logs ' -F yellow -B black"
1129+
1130+
del %localappdata%\EpicGamesLauncher\Saved\Logs /F /Q /S >nul 2>nul
1131+
del %localappdata%\CrashReportClient\Saved\Logs /F /Q /S >nul 2>nul
1132+
1133+
del "%localappdata%\Steam\htmlcache\Code Cache" /F /Q /S >nul 2>nul
1134+
del %localappdata%\Steam\htmlcache\GPUCache /F /Q /S >nul 2>nul
1135+
del %localappdata%\Steam\htmlcache\Cache /F /Q /S >nul 2>nul
1136+
1137+
del %AppData%\Origin\Telemetry /F /Q /S >nul 2>nul
1138+
del %AppData%\Origin\Logs /F /Q /S >nul 2>nul
1139+
del %AppData%\Origin\NucleusCache /F /Q /S >nul 2>nul
1140+
del %AppData%\Origin\ConsolidatedCache /F /Q /S >nul 2>nul
1141+
del %AppData%\Origin\CatalogCache /F /Q /S >nul 2>nul
1142+
del %localAppData%\Origin\ThinSetup /F /Q /S >nul 2>nul
1143+
del %AppData%\Origin\Telemetry /F /Q /S >nul 2>nul
1144+
del %localAppData%\Origin\Logs /F /Q /S >nul 2>nul
1145+
1146+
del %localAppData%\Battle.net\Cache /F /Q /S >nul 2>nul
1147+
del %AppData%\Battle.net\Logs /F /Q /S >nul 2>nul
1148+
del %AppData%\Battle.net\Errors /F /Q /S >nul 2>nul
1149+
1150+
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1151+
powershell -Command "Write-Host ' [Clean] All Web Browsers Cache/Logs ' -F yellow -B black"
1152+
1153+
del "%LocalAppData%\Google\Chrome\User Data\Default\Cache" /F /Q /S >nul 2>nul
1154+
del "%LocalAppData%\Google\Chrome\User Data\Default\Media Cache" /F /Q /S >nul 2>nul
1155+
del "%LocalAppData%\Google\Chrome\User Data\Default\GPUCache" /F /Q /S >nul 2>nul
1156+
del "%LocalAppData%\Google\Chrome\User Data\Default\Storage\ext" /F /Q /S >nul 2>nul
1157+
del "%LocalAppData%\Google\Chrome\User Data\Default\Service Worker" /F /Q /S >nul 2>nul
1158+
del "%LocalAppData%\Google\Chrome\User Data\ShaderCache" /F /Q /S >nul 2>nul
1159+
1160+
1161+
del "%LocalAppData%\Microsoft\Edge\User Data\Default\Cache" /F /Q /S >nul 2>nul
1162+
del "%LocalAppData%\Microsoft\Edge\User Data\Default\Media Cache" /F /Q /S >nul 2>nul
1163+
del "%LocalAppData%\Microsoft\Edge\User Data\Default\GPUCache" /F /Q /S >nul 2>nul
1164+
del "%LocalAppData%\Microsoft\Edge\User Data\Default\Storage\ext" /F /Q /S >nul 2>nul
1165+
del "%LocalAppData%\Microsoft\Edge\User Data\Default\Service Worker" /F /Q /S >nul 2>nul
1166+
del "%LocalAppData%\Microsoft\Edge\User Data\ShaderCache" /F /Q /S >nul 2>nul
1167+
del "%LocalAppData%\Microsoft\Edge SxS\User Data\Default\Cache" /F /Q /S >nul 2>nul
1168+
del "%LocalAppData%\Microsoft\Edge SxS\User Data\Default\Media Cache" /F /Q /S >nul 2>nul
1169+
del "%LocalAppData%\Microsoft\Edge SxS\User Data\Default\GPUCache" /F /Q /S >nul 2>nul
1170+
del "%LocalAppData%\Microsoft\Edge SxS\User Data\Default\Storage\ext" /F /Q /S >nul 2>nul
1171+
del "%LocalAppData%\Microsoft\Edge SxS\User Data\Default\Service Worker" /F /Q /S >nul 2>nul
1172+
del "%LocalAppData%\Microsoft\Edge SxS\User Data\ShaderCache" /F /Q /S >nul 2>nul
1173+
1174+
del "%LocalAppData%\Opera Software\Opera Stable\cache" /F /Q /S >nul 2>nul
1175+
del "%AppData%\Opera Software\Opera Stable\GPUCache" /F /Q /S >nul 2>nul
1176+
del "%AppData%\Opera Software\Opera Stable\ShaderCache" /F /Q /S >nul 2>nul
1177+
del "%AppData%\Opera Software\Opera Stable\Jump List Icons" /F /Q /S >nul 2>nul
1178+
del "%AppData%\Opera Software\Opera Stable\Jump List IconsOld\Jump List Icons" /F /Q /S >nul 2>nul
1179+
1180+
del "%LocalAppData%\Vivaldi\User Data\Default\Cache" /F /Q /S >nul 2>nul
1181+
1182+
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1183+
powershell -Command "Write-Host ' [Clean] Windows Defender Cache/Logs ' -F yellow -B black"
1184+
1185+
del "%ProgramData%\Microsoft\Windows Defender\Network Inspection System\Support\*.log" /F /Q /S >nul 2>nul
1186+
del "%ProgramData%\Microsoft\Windows Defender\Scans\History\CacheManager" /F /Q /S >nul 2>nul
1187+
del "%ProgramData%\Microsoft\Windows Defender\Scans\History\ReportLatency\Latency" /F /Q /S >nul 2>nul
1188+
del "%ProgramData%\Microsoft\Windows Defender\Scans\History\Service\*.log" /F /Q /S >nul 2>nul
1189+
del "%ProgramData%\Microsoft\Windows Defender\Scans\MetaStore" /F /Q /S >nul 2>nul
1190+
del "%ProgramData%\Microsoft\Windows Defender\Support" /F /Q /S >nul 2>nul
1191+
del "%ProgramData%\Microsoft\Windows Defender\Scans\History\Results\Quick" /F /Q /S >nul 2>nul
1192+
del "%ProgramData%\Microsoft\Windows Defender\Scans\History\Results\Resource" /F /Q /S >nul 2>nul
1193+
1194+
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1195+
powershell -Command "Write-Host ' [Clean] Windows Font Cache ' -F yellow -B black"
1196+
1197+
net stop FontCache >nul 2>nul
1198+
net stop FontCache3.0.0.0 >nul 2>nul
1199+
del "%WinDir%\ServiceProfiles\LocalService\AppData\Local\FontCache\*.dat" /F /Q /S >nul 2>nul
1200+
del "%WinDir%\SysNative\FNTCACHE.DAT" /F /Q /S >nul 2>nul
1201+
del "%WinDir%\System32\FNTCACHE.DAT" /F /Q /S >nul 2>nul
1202+
net start FontCache >nul 2>nul
1203+
net start FontCache3.0.0.0 >nul 2>nul
1204+
1205+
title %version% [%counter%/%alltodo%] && set /a counter+=1 >nul 2>nul
1206+
powershell -Command "Write-Host ' [Clean] Windows Icon Cache ' -F yellow -B black"
1207+
1208+
%WinDir%\SysNative\ie4uinit.exe -show >nul 2>nul
1209+
%WinDir%\System32\ie4uinit.exe -show >nul 2>nul
1210+
del %LocalAppData%\IconCache.db /F /Q /S >nul 2>nul
1211+
del "%LocalAppData%\Microsoft\Windows\Explorer\iconcache_*.db" /F /Q /S >nul 2>nul
1212+
1213+
1214+
10741215
del %programdata%\etcleaning.lbool >nul 2>nul
10751216

10761217
:SkipCleaning
@@ -1130,7 +1271,7 @@ del %programdata%\etdnsone.lbool >nul 2>nul
11301271

11311272
:SkipDNSOne
11321273

1133-
echo ------------------------------------------------
1274+
echo ------------------------------------------------------------------------
11341275

11351276
set announcement=Everything has been done. Reboot is recommended.
11361277
echo %announcement%

0 commit comments

Comments
 (0)