Skip to content

Commit 21fdff6

Browse files
committed
script: update version to 2.6, add option to create system restore point, and enhance menu options
Signed-off-by: KARTHIK LAL <karthik.lal558@gmail.com>
1 parent cab13ad commit 21fdff6

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

CleanWindowsPro.cmd

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ set "email=dev@karthiklal.in"
66
set "project=CleanWindowsPro"
77
set "projectUpperCase=CLEANWINDOWSPRO"
88
set "created-date=10-06-2022"
9-
set "current-date=%date%"
10-
set "version=2.5.0"
9+
set "version=2.6"
1110
set "copy-right=(C) 2022-2024 %developer%"
1211
set "author-website=karthiklal.in"
1312

@@ -94,27 +93,29 @@ echo =======================================
9493
echo.
9594
echo 1. Fully Automate (Recommended)
9695
echo 2. Clear Temporary Files (Quick-Clean)
97-
echo 3. Clear System Restore Points (Not Recommended)
98-
echo 4. Repair Damaged System Files
99-
echo 5. Clear DNS Cache (Recommended)
100-
echo 6. Use Custom DNS Server (Optional)
101-
echo 7. EULA (End User License Agreement)
102-
echo 8. Block Windows Telemetry (Optional)
103-
echo 9. Clear all browser cache and Cookies (Optional)
104-
echo 10. Exit
96+
echo 3. Create System Restore Point (Recommended)
97+
echo 4. Clear System Restore Points (Not Recommended)
98+
echo 5. Repair Damaged System Files
99+
echo 6. Clear DNS Cache (Recommended)
100+
echo 7. Use Custom DNS Server (Optional)
101+
echo 8. EULA (End User License Agreement)
102+
echo 9. Block Windows Telemetry (Optional)
103+
echo 10. Clear all browser cache and Cookies (Optional)
104+
echo 11. Exit
105105
echo.
106106
set /p option="Enter your selection: "
107107

108108
if "%option%"=="1" goto AUTOMATE
109109
if "%option%"=="2" goto CLEAR-TEMPS
110-
if "%option%"=="3" goto CLEAR-SYSTEM-RESTORE-POINTS
111-
if "%option%"=="4" goto REPAIR-DAMAGED-SYSTEM-FILES
112-
if "%option%"=="5" goto CLEAR-DNS-CACHE
113-
if "%option%"=="6" goto USE-CUSTOM-DNS
114-
if "%option%"=="7" goto EULA
115-
if "%option%"=="8" goto BLOCK-TELEMETRY
116-
if "%option%"=="9" goto CLEAR-BROWSER-CACHE
117-
if "%option%"=="10" goto END
110+
if "%option%"=="3" goto CREATE-SYSTEM-RESTORE-POINT
111+
if "%option%"=="4" goto CLEAR-SYSTEM-RESTORE-POINTS
112+
if "%option%"=="5" goto REPAIR-DAMAGED-SYSTEM-FILES
113+
if "%option%"=="6" goto CLEAR-DNS-CACHE
114+
if "%option%"=="7" goto USE-CUSTOM-DNS
115+
if "%option%"=="8" goto EULA
116+
if "%option%"=="9" goto BLOCK-TELEMETRY
117+
if "%option%"=="10" goto CLEAR-BROWSER-CACHE
118+
if "%option%"=="11" goto END
118119

119120
echo Invalid option.
120121
goto MENU
@@ -137,6 +138,11 @@ if /i "%Explorer_Answer%" == "Y" (
137138
echo Continuing the script...
138139
timeout /t 1
139140

141+
@REM Empty the recycle bin
142+
echo Emptying the recycle bin
143+
powershell -Command "Clear-RecycleBin -Force -ErrorAction Ignore"
144+
timeout /t 1
145+
140146
@REM Clear the DNS cache
141147
echo Clearing DNS cache
142148
ipconfig /flushdns
@@ -263,6 +269,14 @@ timeout /t 5
263269
echo Done!
264270
goto MENU
265271

272+
:CREATE-SYSTEM-RESTORE-POINT
273+
color F0
274+
echo Creating system restore point
275+
wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "RestorePointName", 100, 7
276+
timeout /t 5
277+
echo Done!
278+
goto MENU
279+
266280
:CLEAR-SYSTEM-RESTORE-POINTS
267281
color F0
268282
echo Clearing system restore points

0 commit comments

Comments
 (0)