怎么写清理系统垃圾文件程序

怎么写清理系统垃圾文件程序,第1张

新建基本文档,然后把下面的东西复制到里面,再保存为:垃圾清理.bat

@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\*.*"

del /f /s /q "D:\则激My Documents\Cookies\*.txt"猜逗

echo 系统垃圾清理完成!!!!!!!!! OK

echo. &pause

所谓系统垃圾就是临时文件,而临早滑时文件一般都有统一的扩展名察汪或存储在指定的目录中,那么删除它们即可。

@echo

off

echo

提示

正在清除系统垃圾文件,请稍等......

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.

echo

========================================================================

echo.

echo

提示

系统垃圾清理完成!

echo.

pause

@ ECHO OFF

color 1f

title 清除所有多余的启动项目

PAUSE

reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f

reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /va /f

reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v ctfmon.exe /d C:\WINDOWS\system32\ctfmon.exe

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg" /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\IMJPMIG8.1"

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\IMJPMIG8.1" /v command /d ""C:\WINDOWS\IME\imjp8_1\IMJPMIG.EXE" /Spoil /RemAdvDef /Migration32"

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\IMJPMIG8.1" /v hkey /d HKLM

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\拦友IMJPMIG8.1" /v inimapping /d 0

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\IMJPMIG8.1" /v item /d IMJPMIG

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\IMJPMIG8.1" /森含v key /d SOFTWARE\Microsoft\Windows\CurrentVersion\Run

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002A"

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002A" /v command /d "C:\WINDOWS\system32\IME\TINTLGNT\TINTSETP.EXE /IMEName"

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002A" /v hkey /d HKLM

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002A" /v inimapping /d 0

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002A" /v item /d TINTSETP

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002A" /v key /d SOFTWARE\Microsoft\Windows\CurrentVersion\Run

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\简春槐startupreg\PHIME2002ASync"

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002ASync" /v command /d ""C:\WINDOWS\IME\imjp8_1\IMJPMIG.EXE" /Spoil /RemAdvDef /Migration32"

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002ASync" /v hkey /d HKLM

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002ASync" /v inimapping /d 0

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002ASync" /v item /d TINTSETP

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\PHIME2002ASync" /v key /d SOFTWARE\Microsoft\Windows\CurrentVersion\Run

del "C:\Documents and Settings\All Users\「开始」菜单\程序\启动\*.*" /q /f

del "C:\Documents and Settings\Default User\「开始」菜单\程序\启动\*.*" /q /f

del "%userprofile%\「开始」菜单\程序\启动\*.*" /q /f

start C:\WINDOWS\pchealth\helpctr\binaries\msconfig.exe

仅保留输入法(ctfmon)用记事本把上面的字复制进去,点“另存为”,把文件名定为“*.bat”就完成,记住后缀名一定要是.bat,


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12536209.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-26
下一篇 2023-05-26

发表评论

登录后才能评论

评论列表(0条)

保存