Board logo

标题: [原创][分享][求助]再论垃圾清扫代码,有兴趣的进 [打印本页]

作者: read4864     时间: 2007-4-15 12:08    标题: [原创][分享][求助]再论垃圾清扫代码,有兴趣的进

可以把程序弄到启动项里,每1小时自动执行一次,作成后台运行连窗口也不会显。
以下是代码段:
@echo off
mode con: cols=40 lines=1
@title 一键清扫-作者:孤剑流星-版本:01.01.10
@color 1f
:start
cls
mshta vbscript:CreateObject("SAPI.SpVoice").Speak("清扫程序开始执行,请捎后")(Window.close)
cls
mshta vbscript:CreateObject("SAPI.SpVoice").Speak("清扫临时文件中")(Window.close)
set,========================================================================================================&for /l %%i in (1,1,20)do @call set/p= %%,:~%%i,1%%<nul&ping/n 1 127.1>nul
SET SEN=%A:~0,1%
SET SU=%A:~1,2%
start /MIN attrib -a -h -s
del  /f /s /q  %systemdrive%\*.tmp>nul
cls
start /MIN attrib -a -h -s
del  /f /s /q  %systemdrive%\*._mp>nul
cls
start /MIN attrib -a -h -s
del  /f /s /q  %systemdrive%\*.log>nul
cls
start /MIN attrib -a -h -s
del /f /s /q  %systemdrive%\*.gid>nul
cls
start /MIN attrib -a -h -s
del /f /s /q  %systemdrive%\*.chk>nul
cls
start /MIN attrib -a -h -s
del /f /s /q  %systemdrive%\*.old>nul
cls
start /MIN attrib -a -h -s
del /f /s /q  %systemdrive%\recycled\*.*>nul
cls
start /MIN attrib -a -h -s
del /f /s /q  %windir%\*.bak>nul
cls
start /MIN attrib -a -h -s
del /f /s /q  %windir%\prefetch\*.*>nul
cls
start /MIN attrib -a -h -s
rd /s /q  %windir%\temp & md %windir%\temp>nul
cls
start /MIN attrib -a -h -s
del /f /s /q  "%userprofile%\Local Settings\Temp\*.*">nul
cls
start /MIN attrib -a -h -s
del /f /q  %userprofile%\Administrator\*.*>nul
cls
start /MIN attrib -a -h -s
del /f /q  %userprofile%\recent\*.*
cls
start /MIN attrib -a -h -s
del /f /s /q  "%userprofile%\recent\*.*">nul
cls
start /MIN attrib -a -h -s
del /f /s  /q "%userprofile%\Local Settings\Temporary Internet Files\*.*">nul
cls
set,========================================================================================================&for /l %%i in (1,1,40)do @call set/p= %%,:~%%i,1%%<nul&ping/n 1 127.1>nul
SET SEN=%B:~0,1%
SET SU=%B:~1,2%
@echo Wscript.Sleep Wscript.Arguments(0) * 1000>Delay.vbs
Delay.vbs 300
del Delay.vbs
mshta vbscript:CreateObject("SAPI.SpVoice").Speak("临时文件清扫成功")(Window.close)
mshta vbscript:CreateObject("SAPI.SpVoice").Speak("方丈,清扫工作以执行完毕,一小时后再见!闪人之")(Window.close)
@echo Wscript.Sleep Wscript.Arguments(0) * 1000>Delay.vbs
Delay.vbs 3600
del Delay.vbs
goto :aaa
:aaa
mshta vbscript:CreateObject("SAPI.SpVoice").Speak("方丈,您已经工作一个小时了,该休息一下了,顺便让小沙弥为您清扫下电脑运行中的垃圾。")(Window.close)
goto :start
----------------------------------------------------------------
清除程序再次优化版
----------------------------------------------------------------
请教高手如何让程序开机1小时后执行第二次时屏幕自动黑屏5分钟?我总是管不住自己,所以。。。。。。!!!
作者: read4864     时间: 2007-4-15 12:11
最好在定上4个小时后关机。