-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleaner.cmd
116 lines (94 loc) · 2.48 KB
/
cleaner.cmd
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
:: echo off / title
@echo off
title System Cleaner ^| By waxnet
:: ask for admin
(Net session > nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)
:: start
title System Cleaner ^| By waxnet
echo Welcome to System Cleaner!
:: important
timeout /t 2 > nul
echo.
echo Please don't close the cleaner during the cleaning process!
:: stage 1
timeout /t 4 > nul
echo.
title System Cleaner ^| By waxnet ^| Stage 1
echo Stage 1 starting...
timeout /t 1 > nul
echo - Creating cleaning process data file...
cd /D "%~dp0"
del data.txt > nul 2>&1
(
echo System Cleaner Data
echo.
echo -- Free space before cleanup
fsutil volume diskfree c:
echo -- End
) > data.txt
echo Stage 1 completed!
:: stage 2
timeout /t 2 > nul
echo.
title System Cleaner ^| By waxnet ^| Stage 2
echo Stage 2 starting...
timeout /t 1 > nul
echo - Creating system restore point...
wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "System Cleaner", 100, 7 > nul 2>&1
echo Stage 2 completed!
:: stage 3
timeout /t 2 > nul
echo.
title System Cleaner ^| By waxnet ^| Stage 3
echo Stage 3 starting...
timeout /t 1 > nul
echo - Executing disk cleanup...
cleanmgr /sagerun
cleanmgr /verylowdisk /c
timeout /t 1 > nul
echo - Deleting temporary files...
del %temp%\*.* /s /q > nul 2>&1
del c:\windows\prefetch\*.* /s /q > nul 2>&1
del c:\windows\softwaredistribution\download\*.* /s /q > nul 2>&1
del %appdata%\microsoft\windows\recent\*.lnk /s /q > nul 2>&1
timeout /t 1 > nul
echo - Flushing Microsoft Store cache...
WSreset.exe
timeout /t 1 > nul
echo - Flushing DNS Resolver cache...
ipconfig /flushdns > nul 2>&1
echo Stage 3 completed!
:: stage 4
timeout /t 2 > nul
echo.
title System Cleaner ^| By waxnet ^| Stage 4
echo Stage 4 starting...
timeout /t 1 > nul
echo - Saving cleaning process data...
(
echo.
echo -- Free space after cleanup
fsutil volume diskfree c:
echo -- End
echo.
echo -- Restore point information
echo Name: Automatic Restore Point
echo -- End
echo.
echo -- Credits
echo Author: waxnet
echo Discord: https://discord.gg/keTpWFAKx6
echo GitHub: https://github.com/waxnet
echo -- End
) >> data.txt
timeout /t 1 > nul
echo - Opening data file...
start data.txt
echo Stage 4 completed!
:: end
timeout /t 2 > nul
echo.
title System Cleaner ^| By waxnet
echo Cleaning process successfully completed!
echo Press any key to exit...
pause > nul