如何实现关机时清空垃圾文件

来源:百度知道 编辑:UC知道 时间:2024/06/06 09:32:44

超级兔子就能实现
还有本地安全设置可以实现关机清理虚拟内存页面
还有组策略 》计算机配置》windows设置 》脚本里有个启动和关机
@echo off
echo 正在清理系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清理系统垃圾完成!
复制上面的 改扩展名为.bat
然后放在关机里面
运行组策略,找到用户配置》管理模板》任务栏和开