@@ -33,12 +33,12 @@ if '%errorlevel%' NEQ '0' (
33
33
:: https://github.com/semazurek/ET-All-in-One-Optimizer
34
34
:: https://www.paypal.com/paypalme/rikey
35
35
36
- set version = E.T. ver 4.6
36
+ set version = E.T. ver 4.7
37
37
title %version%
38
-
38
+ :: mode con cols=72 lines=30
39
39
set /a counter = 1
40
40
set /a alltodo = 0
41
- :: alltodo all 66
41
+ :: alltodo all 71
42
42
43
43
:: First Admin Check
44
44
NET SESSION > nul 2 >& 1
@@ -62,6 +62,8 @@ powershell (New-Object -ComObject Wscript.Shell).Popup("""%announcement%""",0,""
62
62
:: Checks if it is running as administrator if not quit
63
63
exit
64
64
65
+
66
+
65
67
:: GUI Window Form
66
68
:GUIChoice
67
69
:: Cleaning help files
@@ -286,14 +288,15 @@ echo $extraFormB7 = New-Object System.Windows.Forms.Button;
286
288
echo $extraFormB8 = New-Object System.Windows.Forms.Button;
287
289
echo $extraFormB9 = New-Object System.Windows.Forms.Button;
288
290
echo $extraFormB10 = New-Object System.Windows.Forms.Button;
291
+ echo $extraFormB11 = New-Object System.Windows.Forms.Button;
289
292
echo $extraForm.MinimizeBox = $false;
290
293
echo $extraForm.MaximizeBox = $false;
291
294
echo $extraForm.TopMost = $true;
292
295
echo $extraForm.AutoSizeMode = 'GrowAndShrink';
293
296
echo $extraForm.FormBorderStyle = 'FixedDialog';
294
297
echo $extraForm.AcceptButton = $extraFormExit;
295
298
echo $extraForm.CancelButton = $extraFormExit;
296
- echo $extraForm.ClientSize = '200, 330 ';
299
+ echo $extraForm.ClientSize = '200, 360 ';
297
300
echo $extraForm.ShowInTaskBar = $false;
298
301
299
302
echo $extraForm.Location = ^ (30,30^ );
@@ -360,6 +363,12 @@ echo $extraFormB10.Text = 'Event Viewer';
360
363
echo $extraFormB10.add_click^ ({eventvwr.msc}^ );
361
364
echo $extraForm.Controls.Add^ ($extraFormB10^ );
362
365
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
+
363
372
echo [void]$extraForm.ShowDialog^ (^ )
364
373
echo };
365
374
@@ -383,17 +392,36 @@ echo ^(addMenuItem -ParentItem ^([ref]$mainMenu^) -ItemName 'mnuFile' -ItemText
383
392
echo $form.ShowDialog^ (^ );
384
393
)> GUI.ps1
385
394
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
+
386
408
:: Force PS authorization for scripts
387
409
Powershell -Command " set-executionpolicy remotesigned"
388
410
cls
389
411
echo Selection window has been initiated
390
412
Powershell -Command " .\GUI.ps1 %version% " > nul 2 > nul
391
413
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
+
392
420
if not exist %programdata% \*.lbool exit.
393
421
:: if not chosen any option = no .lbool files in programdata = exit
394
422
395
423
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
397
425
if exist %programdata% \etstartup.lbool set /a alltodo += 1
398
426
if exist %programdata% \etbloatware.lbool set /a alltodo += 1
399
427
if exist %programdata% \etservices.lbool set /a alltodo += 2
@@ -405,9 +433,6 @@ if exist %programdata%\etonedrive.lbool set /a alltodo+=1
405
433
if exist %programdata% \etxbxservices.lbool set /a alltodo += 1
406
434
if exist %programdata% \etdnsone.lbool set /a alltodo += 1
407
435
408
- :: Cleaning GUI windows form file after usage
409
- if exist GUI.ps1 del GUI.ps1 > nul 2 > nul
410
-
411
436
:: BackUp/Restore Point First Time Run Asking
412
437
:RestorePoint
413
438
cls
@@ -1009,31 +1034,19 @@ if not exist %programdata%\etcleaning.lbool goto SkipCleaning
1009
1034
1010
1035
:: TEMP/Logs/Cache/Prefetch/Updates Cleaning
1011
1036
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"
1013
1038
Del /S /F /Q %temp% > nul 2 > nul
1014
1039
Del /S /F /Q %Windir% \Temp > nul 2 > nul
1015
1040
1016
1041
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"
1018
1043
Del /S /F /Q %windir% \SoftwareDistribution\Download > nul 2 > nul
1044
+ Del /S /F /Q %WinDir% \Logs\WindowsUpdate > nul 2 > nul
1019
1045
1020
1046
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"
1022
1048
Del /S /F /Q %windir% \Prefetch > nul 2 > nul
1023
1049
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
-
1037
1050
del %AppData% \vstelemetry > nul 2 > nul
1038
1051
del %LocalAppData% \Microsoft\VSApplicationInsights /F /Q /S > nul 2 > nul
1039
1052
del %ProgramData% \Microsoft\VSApplicationInsights /F /Q /S > nul 2 > nul
@@ -1045,13 +1058,6 @@ del %Temp%\VSRemoteControl /F /Q /S >nul 2>nul
1045
1058
del %Temp% \VSTelem /F /Q /S > nul 2 > nul
1046
1059
del %Temp% \VSTelem.Out /F /Q /S > nul 2 > nul
1047
1060
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
-
1055
1061
del %localappdata% \Yarn\Cache /F /Q /S > nul 2 > nul
1056
1062
1057
1063
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
1061
1067
1062
1068
del %localappdata% \Microsoft\Windows\WebCache /F /Q /S > nul 2 > nul
1063
1069
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
+
1064
1117
:: Cleaning Disk - cleanmgr
1065
1118
start cleanmgr.exe /autoclean
1066
1119
@@ -1071,6 +1124,94 @@ start CCleaner.exe /AUTO
1071
1124
1072
1125
:NoCC
1073
1126
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
+
1074
1215
del %programdata% \etcleaning.lbool > nul 2 > nul
1075
1216
1076
1217
:SkipCleaning
@@ -1130,7 +1271,7 @@ del %programdata%\etdnsone.lbool >nul 2>nul
1130
1271
1131
1272
:SkipDNSOne
1132
1273
1133
- echo ------------------------------------------------
1274
+ echo ------------------------------------------------------------------------
1134
1275
1135
1276
set announcement = Everything has been done. Reboot is recommended.
1136
1277
echo %announcement%
0 commit comments