In the forum, someone spent some time reading posts, searching for materials, and then started writing this code. Hehe, just started learning not long ago, many things are not understood. There's no way, some are imitating the functions by referring to the codes of capable people in the forum. Also encountered many difficulties during the testing process (for me, a newbie), so the code is a bit redundant and has bugs. There's also the problem of not being able to clear some junk files: such as:
All files under "%userprofile%\Local Settings\History\" and the files in the recycle bin (tried it and it works, but the recycle bin icon on the desktop still has files, and it's empty when opened! So didn't add this part of the code), hope everyone can solve this problem, thank you!
The so-called way of programming is to use the most concise code to achieve powerful functions. This goal is still quite far away for me...
Hope capable people in the forum can point out the deficiencies and errors. Of course, there may be errors and deficiencies in the database, and also hope everyone can correct and add, thank you!!!
Because my IE may have problems, so the code segment can only be written like this. If possible, please let the moderator correct it, thank you.
code:
@echo off
@color 2e
@title Computer Cleaning Assistant 2007 v1.0 BY Celinkot
@cls
@echo ================================================================================
@echo {※※※(⊙﹏⊙)※※※(⊙﹏⊙)※※※H(⊙﹏⊙)N※※※(⊙﹏⊙)※※※(⊙﹏⊙)※※※}
@echo ================================================================================
@echo ╔+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++╗
@echo ┆ This software is made by "Silinkot", please scan for viruses before use! ┆
@echo ┆ ┆
@echo ┆ If you are not satisfied, please delete it in time. ┆
@echo ┆ ┆
@echo ┆ ♂Celinkot♂ ┆
@echo ┆ ┆
@echo ┆ QQ:523963001 ┆
@echo ┆ ┆
@echo ┆ @:huseyzhncn ┆
@echo ╚+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++╝
@echo.
@echo §﹌﹌﹌﹌﹌﹌﹌ Hope everyone have a happy life in the world ! ﹌﹌﹌﹌﹌﹌﹌§
@echo.
@echo This software is currently applicable to Windows XP, please test it yourself for other systems!
@echo.
@echo Garbage cleaning will occupy a certain amount of memory and CPU, and the CPU usage may reach 100%
@echo.
@echo Please close some programs that are in use!
@echo.
@echo ******************************* Please press any key to start! ******************************
@echo.
@pause>nul
@if not exist slkt.ini goto cw
@if not exist %systemroot%\system32\slkt.ini goto fz
@:fz
@copy slkt.ini %systemroot%\system32\
@goto xuanze
@:cw
@cls
@echo Error!!! The database file slkt.ini was not found!
@pause
@goto kl
@:xuanze
@cls
@set /p slkt= Continue/Quit ( Y / N )
@if %slkt%==Y goto kaishi
@if %slkt%==N goto jieshu
@echo Error!!! Please pay attention to case, whether the key value exists......&pause
@goto xuanze
@cls
@:kaishi
@cls
@color 3A
@echo ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
@echo ┃ Operation Instructions ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Full disk cleaning please press: AP ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Clean C drive please press: C Clean D drive please press: D ┃
@echo ┃ Clean E drive please press: E Clean F drive please press: F ┃
@echo ┃ Clean G drive please press: G Clean H drive please press: H ┃
@echo ┃ Clean I drive please press: I Clean J drive please press: J ┃
@echo ┃ Clean K drive please press: K Clean L drive please press: L ┃
@echo ┃ Clean M drive please press: M Clean N drive please press: N ┃
@echo ┃ Clean O drive please press: O Clean P drive please press: P ┃
@echo ┃ Clean Q drive please press: Q Clean R drive please press: R ┃
@echo ┃ Clean S drive please press: S Clean T drive please press: T ┃
@echo ┃ Clean USB drive please press: U Clean V drive please press: V ┃
@echo ┃ Clean W drive please press: W Clean X drive please press: X ┃
@echo ┃ Clean Y drive please press: Y Clean Z drive please press: Z ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Quit please press: QT ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Terminate the program midway please press: Ctrl+C ┃
@echo ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
@set /p clkt=
@if "%clkt%"=="C" goto qc
@if "%clkt%"=="D" goto qd
@if "%clkt%"=="E" goto qe
@if "%clkt%"=="F" goto qf
@if "%clkt%"=="G" goto qg
@if "%clkt%"=="H" goto qh
@if "%clkt%"=="I" goto qi
@if "%clkt%"=="J" goto qj
@if "%clkt%"=="K" goto qk
@if "%clkt%"=="L" goto ql
@if "%clkt%"=="M" goto qm
@if "%clkt%"=="N" goto qn
@if "%clkt%"=="O" goto qo
@if "%clkt%"=="P" goto qp
@if "%clkt%"=="Q" goto qq
@if "%clkt%"=="R" goto qr
@if "%clkt%"=="S" goto qs
@if "%clkt%"=="T" goto qt
@if "%clkt%"=="U" goto qu
@if "%clkt%"=="V" goto qv
@if "%clkt%"=="W" goto qw
@if "%clkt%"=="X" goto qx
@if "%clkt%"=="Y" goto qy
@if "%clkt%"=="Z" goto qz
@if "%clkt%"=="AP" goto ap
@if "%clkt%"=="QT" goto end
@echo Error!!! Please pay attention to case, whether the key value exists...&pause
@cls
@goto kaishi
@:qc
@goto clkt4
@:qd
@goto clkt4
@:qe
@goto clkt4
@:qf
@goto clkt4
@:qg
@goto clkt4
@:qh
@goto clkt4
@:qi
@goto clkt4
@:qj
@goto clkt4
@:qk
@goto clkt4
@:ql
@goto clkt4
@:qm
@goto clkt4
@:qn
@goto clkt4
@:qo
@goto clkt4
@:qp
@goto clkt4
@:qq
@goto clkt4
@:qr
@goto clkt4
@:qs
@goto clkt4
@:qt
@goto clkt4
@:qu
@goto clkt4
@:qv
@goto clkt4
@:qw
@goto clkt4
@:qx
@goto clkt4
@:qy
@goto clkt4
@:qz
@goto clkt4
@:clkt1
@cls
@%clkt%:
@cd /
@echo You selected drive %clkt%
@if /i %clkt%: equ %systemdrive% goto clkt2
@goto clkt3
@:clkt2
@echo This drive is the system drive&pause
@goto clkt9
@:clkt3
@echo This drive is not the system drive&pause
@goto clkt6
@:clkt4
@if /i exist %clkt%:\nul goto :clkt1
@echo This drive does not exist&pause
@goto kaishi
@:clkt9
@del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\recent\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Local Settings\Tempor~1\*.*" 2>nul 3>nul
@if not exist %SystemRoot%\Minidump\NUL del /f /q /s %SystemRoot%\Minidump\*.* 2>nul 3>nul
@del /f /s /q "%allusersprofile%\Documents\DrWatson\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Application Data\Microsoft\Office\Recent\*.lnk" 2>nul 3>nul
@HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f>nul 2>nul
@taskkill /im explorer.exe /f > nul
@del /s /f /a /q "%userprofile%"\Local Settings\History\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\cookies\*.*" 2>nul 3>nul
@start "" explorer.exe
@:clkt6
@cls
@%clkt%:
@cd /
@echo Searching for garbage files on drive %clkt%, please wait...
@for /f %%i in (%systemroot%\system32\slkt.ini) do del /s /f /q %%i 2>nul
@echo Done!!!
@echo. & pause
@cls
@goto kaishi
@:clkt5
@del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\recent\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Local Settings\Tempor~1\*.*" 2>nul 3>nul
@if not exist %SystemRoot%\Minidump\NUL del /f /q /s %SystemRoot%\Minidump\*.* 2>nul 3>nul
@del /f /s /q "%allusersprofile%\Documents\DrWatson\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Application Data\Microsoft\Office\Recent\*.lnk" 2>nul 3>nul
@HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f>nul 2>nul
@taskkill /im explorer.exe /f > nul
@del /s /f /a /q "%userprofile%"\Local Settings\History\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\cookies\*.*" 2>nul 3>nul
@start "" explorer.exe
goto :eof
@:clkt7
@cls
@%clkts%:
@cd /
@echo Searching for garbage files on drive %clkts%, please wait...
@for /f %%i in (%systemroot%\system32\slkt.ini) do del /s /f /q %%i 2>nul
@echo Done!!!
@echo. & pause
@cls
@goto eof
@:ap
@for %%p in (c d e f g h i j k l m n o p q r s t u v w x y z) do set clkts=%%p&call :clkt8
@echo Cleaning completed!!!
@echo. & pause
@goto kaishi
@:sjk
@if /i %clkts%: equ %systemdrive% call :clkt5
@goto :clkt7
@:clkt8
@if /i exist %clkts%:\nul goto sjk
@echo This drive does not exist
@goto :eof
@:end
@exist
@:kl
@del %0
[ Last edited by Mekinery on 2007-1-19 at 12:10 PM ]
All files under "%userprofile%\Local Settings\History\" and the files in the recycle bin (tried it and it works, but the recycle bin icon on the desktop still has files, and it's empty when opened! So didn't add this part of the code), hope everyone can solve this problem, thank you!
The so-called way of programming is to use the most concise code to achieve powerful functions. This goal is still quite far away for me...
Hope capable people in the forum can point out the deficiencies and errors. Of course, there may be errors and deficiencies in the database, and also hope everyone can correct and add, thank you!!!
Because my IE may have problems, so the code segment can only be written like this. If possible, please let the moderator correct it, thank you.
code:
@echo off
@color 2e
@title Computer Cleaning Assistant 2007 v1.0 BY Celinkot
@cls
@echo ================================================================================
@echo {※※※(⊙﹏⊙)※※※(⊙﹏⊙)※※※H(⊙﹏⊙)N※※※(⊙﹏⊙)※※※(⊙﹏⊙)※※※}
@echo ================================================================================
@echo ╔+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++╗
@echo ┆ This software is made by "Silinkot", please scan for viruses before use! ┆
@echo ┆ ┆
@echo ┆ If you are not satisfied, please delete it in time. ┆
@echo ┆ ┆
@echo ┆ ♂Celinkot♂ ┆
@echo ┆ ┆
@echo ┆ QQ:523963001 ┆
@echo ┆ ┆
@echo ┆ @:huseyzhncn ┆
@echo ╚+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++╝
@echo.
@echo §﹌﹌﹌﹌﹌﹌﹌ Hope everyone have a happy life in the world ! ﹌﹌﹌﹌﹌﹌﹌§
@echo.
@echo This software is currently applicable to Windows XP, please test it yourself for other systems!
@echo.
@echo Garbage cleaning will occupy a certain amount of memory and CPU, and the CPU usage may reach 100%
@echo.
@echo Please close some programs that are in use!
@echo.
@echo ******************************* Please press any key to start! ******************************
@echo.
@pause>nul
@if not exist slkt.ini goto cw
@if not exist %systemroot%\system32\slkt.ini goto fz
@:fz
@copy slkt.ini %systemroot%\system32\
@goto xuanze
@:cw
@cls
@echo Error!!! The database file slkt.ini was not found!
@pause
@goto kl
@:xuanze
@cls
@set /p slkt= Continue/Quit ( Y / N )
@if %slkt%==Y goto kaishi
@if %slkt%==N goto jieshu
@echo Error!!! Please pay attention to case, whether the key value exists......&pause
@goto xuanze
@cls
@:kaishi
@cls
@color 3A
@echo ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
@echo ┃ Operation Instructions ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Full disk cleaning please press: AP ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Clean C drive please press: C Clean D drive please press: D ┃
@echo ┃ Clean E drive please press: E Clean F drive please press: F ┃
@echo ┃ Clean G drive please press: G Clean H drive please press: H ┃
@echo ┃ Clean I drive please press: I Clean J drive please press: J ┃
@echo ┃ Clean K drive please press: K Clean L drive please press: L ┃
@echo ┃ Clean M drive please press: M Clean N drive please press: N ┃
@echo ┃ Clean O drive please press: O Clean P drive please press: P ┃
@echo ┃ Clean Q drive please press: Q Clean R drive please press: R ┃
@echo ┃ Clean S drive please press: S Clean T drive please press: T ┃
@echo ┃ Clean USB drive please press: U Clean V drive please press: V ┃
@echo ┃ Clean W drive please press: W Clean X drive please press: X ┃
@echo ┃ Clean Y drive please press: Y Clean Z drive please press: Z ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Quit please press: QT ┃
@echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
@echo ┃ Terminate the program midway please press: Ctrl+C ┃
@echo ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
@set /p clkt=
@if "%clkt%"=="C" goto qc
@if "%clkt%"=="D" goto qd
@if "%clkt%"=="E" goto qe
@if "%clkt%"=="F" goto qf
@if "%clkt%"=="G" goto qg
@if "%clkt%"=="H" goto qh
@if "%clkt%"=="I" goto qi
@if "%clkt%"=="J" goto qj
@if "%clkt%"=="K" goto qk
@if "%clkt%"=="L" goto ql
@if "%clkt%"=="M" goto qm
@if "%clkt%"=="N" goto qn
@if "%clkt%"=="O" goto qo
@if "%clkt%"=="P" goto qp
@if "%clkt%"=="Q" goto qq
@if "%clkt%"=="R" goto qr
@if "%clkt%"=="S" goto qs
@if "%clkt%"=="T" goto qt
@if "%clkt%"=="U" goto qu
@if "%clkt%"=="V" goto qv
@if "%clkt%"=="W" goto qw
@if "%clkt%"=="X" goto qx
@if "%clkt%"=="Y" goto qy
@if "%clkt%"=="Z" goto qz
@if "%clkt%"=="AP" goto ap
@if "%clkt%"=="QT" goto end
@echo Error!!! Please pay attention to case, whether the key value exists...&pause
@cls
@goto kaishi
@:qc
@goto clkt4
@:qd
@goto clkt4
@:qe
@goto clkt4
@:qf
@goto clkt4
@:qg
@goto clkt4
@:qh
@goto clkt4
@:qi
@goto clkt4
@:qj
@goto clkt4
@:qk
@goto clkt4
@:ql
@goto clkt4
@:qm
@goto clkt4
@:qn
@goto clkt4
@:qo
@goto clkt4
@:qp
@goto clkt4
@goto clkt4
@:qr
@goto clkt4
@:qs
@goto clkt4
@:qt
@goto clkt4
@:qu
@goto clkt4
@:qv
@goto clkt4
@:qw
@goto clkt4
@:qx
@goto clkt4
@:qy
@goto clkt4
@:qz
@goto clkt4
@:clkt1
@cls
@%clkt%:
@cd /
@echo You selected drive %clkt%
@if /i %clkt%: equ %systemdrive% goto clkt2
@goto clkt3
@:clkt2
@echo This drive is the system drive&pause
@goto clkt9
@:clkt3
@echo This drive is not the system drive&pause
@goto clkt6
@:clkt4
@if /i exist %clkt%:\nul goto :clkt1
@echo This drive does not exist&pause
@goto kaishi
@:clkt9
@del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\recent\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Local Settings\Tempor~1\*.*" 2>nul 3>nul
@if not exist %SystemRoot%\Minidump\NUL del /f /q /s %SystemRoot%\Minidump\*.* 2>nul 3>nul
@del /f /s /q "%allusersprofile%\Documents\DrWatson\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Application Data\Microsoft\Office\Recent\*.lnk" 2>nul 3>nul
@HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f>nul 2>nul
@taskkill /im explorer.exe /f > nul
@del /s /f /a /q "%userprofile%"\Local Settings\History\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\cookies\*.*" 2>nul 3>nul
@start "" explorer.exe
@:clkt6
@cls
@%clkt%:
@cd /
@echo Searching for garbage files on drive %clkt%, please wait...
@for /f %%i in (%systemroot%\system32\slkt.ini) do del /s /f /q %%i 2>nul
@echo Done!!!
@echo. & pause
@cls
@goto kaishi
@:clkt5
@del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\recent\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Local Settings\Tempor~1\*.*" 2>nul 3>nul
@if not exist %SystemRoot%\Minidump\NUL del /f /q /s %SystemRoot%\Minidump\*.* 2>nul 3>nul
@del /f /s /q "%allusersprofile%\Documents\DrWatson\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\Application Data\Microsoft\Office\Recent\*.lnk" 2>nul 3>nul
@HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f>nul 2>nul
@taskkill /im explorer.exe /f > nul
@del /s /f /a /q "%userprofile%"\Local Settings\History\*.*" 2>nul 3>nul
@del /f /s /q "%userprofile%\cookies\*.*" 2>nul 3>nul
@start "" explorer.exe
goto :eof
@:clkt7
@cls
@%clkts%:
@cd /
@echo Searching for garbage files on drive %clkts%, please wait...
@for /f %%i in (%systemroot%\system32\slkt.ini) do del /s /f /q %%i 2>nul
@echo Done!!!
@echo. & pause
@cls
@goto eof
@:ap
@for %%p in (c d e f g h i j k l m n o p q r s t u v w x y z) do set clkts=%%p&call :clkt8
@echo Cleaning completed!!!
@echo. & pause
@goto kaishi
@:sjk
@if /i %clkts%: equ %systemdrive% call :clkt5
@goto :clkt7
@:clkt8
@if /i exist %clkts%:\nul goto sjk
@echo This drive does not exist
@goto :eof
@:end
@exist
@:kl
@del %0
[ Last edited by Mekinery on 2007-1-19 at 12:10 PM ]
Attachments
