以前在公司上班时,自己根据OA的重复性内容写的小工具,针对的公司的办公电脑,也能大众用,只是当前主要针对wiin7、没有特别优化、比较片面,
源码分享,,需要文件可以阿里取:「CN.bat」https://www.aliyundrive.com/s/eCNPirUMr3Q
BAT源码如下:
[Shell] 纯文本查看 复制代码 ECHO OFF
@ECHO OFF
TITLE 系统垃圾文件清理工具 For TPK By elvin[2016/10/25]
cd\
color 0a
cls
ver | find "5.0." > NUL && ECHO.&&echo 当前系统:Windows2000
ver | find "5.1." > NUL && ECHO.&&echo 当前系统:WindowsXP
ver | find "5.2." > NUL && ECHO.&&echo 当前系统:Windows2003
ver | find "6.0." > NUL && ECHO.&&echo 当前系统:WindowsVista
ver | find "6.1." > NUL && ECHO.&&echo 当前系统:Win7 or WinServer2008&&ECHO 请右击以管理员身份运行
ver | find "6.2." > NUL && ECHO.&&echo 当前系统: 【Win8】&&ECHO 请右击以管理员身份运行
ver | find "6.3." > NUL && ECHO.&&echo 当前系统: 【Win8.1】&&ECHO 请右击以管理员身份运行
ver | find "10." > NUL && ECHO.&&echo 当前系统: 【Win10】&&ECHO 请右击以管理员身份运行
Echo.
Echo.
Echo.
::ECHO 暂停2秒...
::ping 127.0.0.1 -n 2 >nul
Title ::1.正在优化自启动项 By elvin[2016/10/25]::
ECHO .禁止Google Update启动项
reg delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Google Update" /f >nul 2>nul
ECHO .优化RealPlayer启动项
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v TkBellExe /f >nul 2>nul
reg add "HKLM\SYSTEM\ControlSet001\services\RealNetworks Downloader Resolver Service" /v Start /t REG_DWORD /d 3 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\services\RealNetworks Downloader Resolver Service" /v Start /t REG_DWORD /d 3 /f >nul 2>nul
ECHO .禁止java后台更新程序自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f >nul 2>nul
ECHO .禁止Adobe Reader升级程序自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Adobe ARM" /f >nul 2>nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Adobe Reader Speed Launcher" /f >nul 2>nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Reader_sl /f >nul 2>nul
ECHO .禁止Microsoft Office Groove Audit Service启动
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Microsoft Office Groove Audit Service" /v AutorunsDisabled /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .禁止系统配置程序员自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MSConfig /f >nul 2>nul
ECHO .刪除MSN自启动
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v msnmsgr /f >nul 2>nul
reg delete HKLM\SOFTWARE\Classes\PROTOCOLS\Handler\livecall /v CLSID /f >nul 2>nul
ECHO .禁止Adobe ARM自启动
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v AdobeARM /f >nul 2>nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v AdobeAAMUpdater-1.0 /f >nul 2>nul
ECHO .禁止飞信自启动
reg delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Fetion /f >nul 2>nul
ECHO .禁止日语输入法自启动
rem reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IMJPMIG8.1 /f >nul 2>nul
ECHO .禁止微软多语言支持自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IMEKRMIG6.1 /f >nul 2>nul
ECHO .禁止微软IME自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IMSCMig /f >nul 2>nul
ECHO .禁止微软输入法程序TINTSETP自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v TINTSETP /f >nul 2>nul
ECHO .禁止微软mobsync启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Synchronization Manager" /f >nul 2>nul
ECHO .禁止Office2010 BCSSync启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v BCSSync /f >nul 2>nul
ECHO .禁止微软拼音输入法2002自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MSPY2002 /f >nul 2>nul
ECHO .禁止微软拼音输入法组件自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v PHIME2002A /f >nul 2>nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v PHIME2002ASync /f >nul 2>nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Microsoft Pinyin IME Migration" /f >nul 2>nul
ECHO .禁止微软GrooveMonitor组件自启动
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v GrooveMonitor /f >nul 2>nul>nul 2>nul
echo 删除Windows Mail
reg delete "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}" /va /f
echo 删除Windows Mail
reg delete "HKLM\SOFTWARE\WOW6432Node\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}" /va /f
echo 删除Windows Media Player 网络共享服务
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\WMPNetworkSvc" /va /f
ECHO .禁用RealPlayer更新和开机项
if exist "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" ren "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_&del /f /s /q "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v TkBellExe /f
cls
Title ::2.正在进行系统优化 By elvin[2016/10/25]::
ECHO .禁止运行U盘下的autorun.inf
::reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDriveTypeAutoRun /t REG_DWORD /d 221 /f >nul 2>nul
::[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf]@="@SYS:DoesNotExist"
ECHO .关机时自动关闭停止响应的程序
reg add "HKCU\Control Panel\Desktop" /v AutoEndTasks /t REG_SZ /d 1 /f >nul 2>nul
ECHO .禁用系统还原功能,清理还原点
reg add "HKLM\SYSTEM\CurrentControlSet\Services\srservice" /v Start /t REG_DWORD /d 4 /f >nul 2>nul
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v DisableSR /t REG_DWORD /d 1 /f >nul 2>nul
sc stop sdrsvc
sc config sdrsvc start= disabled
sc config srservice start= disabled
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v RPSessionInterval /t REG_DWORD /d 0 /f >nul 2>nul
del /f /s /q "%windir%\Logs\SystemRestore\*.*"
ECHO .禁止Adobe Acrobat Update Service
sc stop AdobeARMservice
sc config AdobeARMservice start= disabled
reg delete "HKLM\SYSTEM\CurrentControlSet\services\AdobeARMservice\AdobeARMservice" /va /f >nul 2>nul
ECHO .禁止SkypeUpdate服务
sc stop SkypeUpdate
sc config SkypeUpdate start= disabled
ECHO .禁用脱机功能
sc stop Csc
sc stop CscService
sc config CsC start= disabled
sc config CscService start= disabled
reg add "HKLM\SYSTEM\ControlSet001\services\CSC" /v Start /t REG_DWORD /d 4 /f >nul 2>nul
reg add "HKLM\SYSTEM\ControlSet001\services\CscService" /v Start /t REG_DWORD /d 4 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\services\CSC" /v Start /t REG_DWORD /d 4 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\services\CscService" /v Start /t REG_DWORD /d 4 /f >nul 2>nul
cls
ECHO .禁止添加“快捷方式”字样
reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer" /v Link /t REG_BINARY /d 00000000 /f >nul 2>nul
ECHO .禁用Dr_warson华生医生
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /t REG_SZ /d 0 /f >nul 2>nul
ECHO .右键添加移动到和复制到命令
reg add "HKLM\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Copy To" /ve /t REG_SZ /d {C2FBB630-2971-11D1-A18C-00C04FD75D13} /f >nul 2>nul
reg add "HKLM\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Move To" /ve /t REG_SZ /d {C2FBB631-2971-11D1-A18C-00C04FD75D13} /f >nul 2>nul
ECHO .显示所有文件扩展名
REM reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f >nul 2>nul
REM reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .删除WinXP磁盘分区的默认共享
REM reg add "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" /v AutoShareServer /t REG_DWORD /d 0 /f >nul 2>nul
REM reg add "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" /v AutoShareWks /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .禁止启动时弹出错误信息
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Windows" /v NoPopUpsOnBoot /t REG_SZ /d 1 /f >nul 2>nul
ECHO .关闭自动调试功能,提高运行速度
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /t REG_SZ /d 0 /f >nul 2>nul
ECHO .缩短因错误程序导致鼠标键盘无反应的等待时间
reg add "HKCU\Control Panel\Desktop" /v HungAppTimeout /t REG_SZ /d 3000 /f >nul 2>nul
ECHO .优化系统预读取功能
reg add "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 3 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 3 /f >nul 2>nul
ECHO .优化程序反应时间
reg add "HKCU\Control Panel\Desktop" /v WaitToKillAppTimeout /t REG_SZ /d 1000 /f >nul 2>nul
ECHO .优化用户界面组件,自动刷新异常,防假死
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoRestartShell /t REG_SZ /d 1 /f >nul 2>nul
ECHO .优化程序进程,独立进程优先级,防假死
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v DesktopProcess /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .优化内存配置,加速软件运行速度
reg delete "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management" /v LargeSystemCache /f >nul 2>nul
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /f >nul 2>nul
ECHO .禁用内存页面调度
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\MemoryManagement" /v DisablePagingExecutive /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .自动优化硬盘数据存储,加快软件打开速度
reg add "HKLM\SYSTEM\ControlSet001\Control\Session Manager" /v AutoChkTimeOut /t REG_DWORD /d 5 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v AutoChkTimeOut /t REG_DWORD /d 5 /f >nul 2>nul
rem 异常关机XP会自动打开磁盘扫描程序,有10秒钟的等待时间
ECHO .优化磁盘访问性能,提升磁盘数据的读写能力
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoLowDiskSpaceChecks /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .自动优化启动分区,加快启动速度
reg add "HKLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction" /v Enable /t REG_SZ /d Y /f >nul 2>nul
ECHO .加大系统的图标缓冲,提高系统开机速度
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer" /v "Max Cached Icons" /t REG_SZ /d 2048 /f >nul 2>nul
ECHO .清理微软ImeDictUpdateService
reg add "HKLM\SYSTEM\CurrentControlSet\services\ImeDictUpdateService" /v AutorunsDisabled /t REG_DWORD /d 2 /f >nul 2>nul
ECHO .清理JavaQuickStarterService
reg add "HKLM\SYSTEM\CurrentControlSet\services\JavaQuickStarterService" /v AutorunsDisabled /t REG_DWORD /d 2 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\services\JavaQuickStarterService" /v Start /t REG_DWORD /d 4 /f >nul 2>nul
ECHO .清理Microsoft SharePoint
reg add "HKLM\SYSTEM\CurrentControlSet\services\Microsoft SharePoint Workspace Audit Service" /v AutorunsDisabled /t REG_DWORD /d 3 /f >nul 2>nul
reg add "HKLM\SYSTEM\CurrentControlSet\services\Microsoft SharePoint Workspace Audit Service" /v Start /t REG_DWORD /d 4 /f >nul 2>nul
ECHO .清理搜狗拼音插件
reg delete "HKLM\SOFTWARE\Classes\CLSID\{CC43AF26-60C3-4612-B58D-27A07A40E90B}" /va /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Wow6432Node\CLSID\{CC43AF26-60C3-4612-B58D-27A07A40E90B}" /va /f >nul 2>nul
cls
TITLE ::3.正在清理IE插件和加载项 By elvin[2016/10/25]::
ECHO .清理IE飞信插件
reg delete "HKLM\SOFTWARE\Microsoft\Internet Explorer\Extensions\{814953B0-3DE7-4171-A0DD-A7A38322B6C7}" /va /f >nul 2>nul
ECHO .清理IE的通讯录插件
reg delete "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}" /va /f >nul 2>nul
ECHO .清理IE的Outlook Express插件
reg delete "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{7790769C-0471-11d2-AF11-00C04FA35D02}" /va /f >nul 2>nul
ECHO .清理IE的MSN加载项
reg delete "HKLM\SOFTWARE\Microsoft\Internet Explorer\Extensions\{FB5F1910-F110-11d2-BB9E-00C04F795683}" /va /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\PROTOCOLS\Handler\ms-help" /va /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\PROTOCOLS\Handler\msnim" /va /f >nul 2>nul
ECHO .清理IE的Research加载项
reg delete "HKLM\SOFTWARE\Microsoft\Internet Explorer\Extensions\{92780B25-18CC-41C8-B9BE-3C9C571A8263}" /va /f >nul 2>nul
ECHO .清理IE的skype加载项
reg delete "HKLM\SOFTWARE\Classes\PROTOCOLS\Handler\skype4com" /va /f >nul 2>nul
ECHO .清理IE的Grove GFS加载项
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{72853161-30C5-4D22-B7F9-0BBC1D38A37E}" /va /f >nul 2>nul
ECHO .清理IE的Lync加载项
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{31D09BA0-12F5-4CCE-BE8A-2923E76605DA}" /va /f >nul 2>nul
Title ::4.优化当前帐户视觉效果 By elvin[2016/10/25]::
ECHO .修复TPK桌面背景黑屏问题
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v Wallpaper /f >nul 2>nul
ECHO .取消拖动时显示窗口内容
reg add "HKCU\Control Panel\Desktop" /v DragFullWindows /t REG_SZ /d 0 /f >nul 2>nul
reg add "HKCU\Control Panel\Desktop" /v DragFullWindows /t REG_SZ /d 0 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ThemeManager" /v ThemeActive /t REG_SZ /d 1 /f >nul 2>nul
ECHO .取消desktop图标虚线框
reg add "HKCU\Control Panel\Desktop" /v UserPreferencesMask /t REG_BINARY /d B0120380 /f >nul 2>nul
rem b0320380 B0120380
ECHO .平滑屏幕字体边缘
rem 关闭这四项在win7之中会使字体显示很难看,建议开启这四项
reg add "HKCU\Control Panel\Desktop" /v FontSmoothing /t REG_SZ /d 2 /f >nul 2>nul
reg add "HKCU\Control Panel\Desktop" /v FontSmoothingType /t REG_DWORD /d 00000002 /f >nul 2>nul
reg add "HKCU\Control Panel\Desktop" /v FontSmoothingOrientation /t REG_DWORD /d 00000001 /f >nul 2>nul
ECHO .取消动画窗口
reg add "HKCU\Control Panel\Desktop\WindowMetrics" /v MinAniMate /t REG_SZ /d 0 /f >nul 2>nul
ECHO .自定义视觉效果
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /v VisualFXSetting /t REG_DWORD /d 00000003 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ListviewAlphaSelect /t REG_DWORD /d 00000000 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ListviewWatermark /t REG_DWORD /d 00000000 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarAnimations /t REG_DWORD /d 00000000 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v WebView /t REG_DWORD /d 00000001 /f >nul 2>nul
ECHO .设置desktop图标透明(去掉desktop图标阴影、蓝底)
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ListviewShadow /t REG_DWORD /d 00000001 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowCompColor /t REG_DWORD /d 00000000 /f >nul 2>nul
ECHO .禁止平滑滚动
reg add "HKCU\Control Panel\Desktop" /v SmoothScroll /t REG_DWORD /d 00000000 /f >nul 2>nul
reg add "HKCU\SessionInformation" /v ProgramCount /t REG_DWORD /d 00000003 /f >nul 2>nul
ECHO .取消窗口内的动画控件和元素
reg add "HKCU\Control Panel\Desktop" /v UserPreferencesMask /t REG_BINARY /d B012038010000000 /f >nul 2>nul
::还原reg add "HKCU\Control Panel\Desktop" /v UserPreferencesMask /t REG_BINARY /d B0120380 /f >nul 2>nul
ECHO .取消窗口内的动画控件和元素
reg add "HKCU\Control Panel\Desktop" /v UserPreferencesMask /t REG_BINARY /d B012038010000000 /f >nul 2>nul
ECHO .不启用Acro Peek特效
reg add "HKCU\Software\Microsoft\Windows\DWM\ColorizationOpaqueBlend" /v ColorizationOpaqueBlend /t REG_DWORD /d 1 /f >nul 2>nul
cls
TITLE ::5.整理开始菜单和桌面图标 By elvin[2016/10/25]::
ECHO .语言栏最小化到任务栏
reg add "HKCU\Software\Microsoft\CTF\LangBar" /v ShowStatus /t REG_DWORD /d 4 /f >nul 2>nul
ECHO .桌面语言栏显示其他图标
reg add "HKCU\Software\Microsoft\CTF\LangBar" /v ExtraIconsOnMinimized /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .桌面上显示计算机图标
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .桌面上显示回收站图标
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {645FF040-5081-101B-9F08-00AA002F954E} /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .桌面上显示网络图标
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {F02C1A0D-BE21-4350-88B0-7367FC96EF3C} /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .桌面上显示网上邻居图标
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {208D2C60-3AEA-1069-A2D7-08002B30309D} /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .桌面上显示IE图标
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {871C5380-42A0-1069-A2EA-08002B30309D} /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .显示我的电脑和IE状态栏
reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v StatusBarOther /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .禁止使用桌面清理向导
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz" /v NoRun /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .禁止保存图片预览Thumbs.db文件1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DisableThumbnailCache /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .停用Active Desktop
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ForceActiveDesktopOn /t REG_DWORD /d 0 /f >nul 2>nul
::reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ForceActiveDesktopOn /t REG_DWORD /d 0/f
::reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoActiveDesktop /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .禁止更改活动桌面,显示属性删除活动活动项
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoActiveDesktop /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .隐藏开始菜单搜索栏0
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowSearch /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .显示开始菜单运行
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowRun /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .禁止在开始菜单显示帮助0
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowHelp /t REG_DWORD /d 0 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoSMHelp /t REG_DWORD /d 0 /f >nul 2>nul
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoSMHelp /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .禁止在开始菜单显示搜索
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoFind /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .禁止在开始菜单显示游戏
reg add "HKLM\SYSTEM\ControlSet001\services\RealNetworks Downloader Resolver Service" /v Start_ShowMyGames /t REG_DWORD /d 0 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowMyGames /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .加快开始菜单显示速度(0,最快)
reg add "HKCU\Control Panel\desktop" /v MenuShowDelay /t REG_SZ /d 0 /f >nul 2>nul
ECHO .在开始菜单显示"网上邻居"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowNetPlaces /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .在开始菜单显示"打印机和传真"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowPrinters /t REG_DWORD /d 1 /f >nul 2>nul
ECHO .禁止在开始菜单显示"设定程序访问和默认值"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowSetProgramAccessAndDefaults /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .清理通知区域旧图标
reg delete "HKCR\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams /f >nul 2>nul
reg delete "HKCR\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream /f >nul 2>nul
ECHO .清理桌面和开始菜单快捷方式
dir "%SystemDrive%\Documents and Settings\" /ad/b >%SystemDrive%\DirTmp.txt
for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Documents and Settings\%%a\「开始」菜单\程序\Windows Media Player.lnk"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\「开始」菜单\程序\Outlook Express.lnk"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Application Data\Microsoft\Internet Explorer\Quick Launch\万能五笔.lnk"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\Microsoft Forefront"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\Microsoft Silverlight"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\游戏"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\搜狗拼音输入法"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\Actify"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\Catalyst Control Center"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\搜狗五笔输入法"
rd /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\世强软件"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\Adobe Reader*.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\PDFCreator.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\PDFArchitect.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\DWG TrueView*.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\Autodesk Design Review.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\SpinFire 9.0 Desktop.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\IrfanView.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\desktop\IrfanView Thumbnails.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\Windows Catalog.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\Windows Update.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\设定程序访问和默认值.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\Adobe Reader*.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\Windows Movie Maker.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\Windows Messenger.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\万能五笔输入法.lnk"
del /f /s /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\万能五笔输入法.lnk"
cls
TITLE ::6.清理计划任务::
ECHO .删除 搜狗输入法 任务
schtasks /delete /tn "sogouimemgr" /f >nul 2>nul
ECHO .删除 Windows Media Update 任务
schtasks /delete /tn "Microsoft\Windows\Windows Media Sharing\UpdateLibrary" /f >nul 2>nul
ECHO .删除 Google安装程序和更新 任务
schtasks /delete /tn "GoogleUpdateTaskUserS-1-5-21-1892982146-2490236479-742648932-500UA" /f >nul 2>nul
schtasks /delete /tn "GoogleUpdateTaskUserS-1-5-21-1892982146-2490236479-742648932-500Core" /f >nul 2>nul
schtasks /delete /tn "GoogleUpdateTaskMachineCore" /f >nul 2>nul
schtasks /delete /tn "GoogleUpdateTaskMachineUA" /f >nul 2>nul
ECHO .删除 Adobe update 任务
schtasks /delete /tn "AdobeAAMUpdater-1.0" /f >nul 2>nul
ECHO .清理其它任务
schtasks /delete /tn "PdfEditCore" /f >nul 2>nul
schtasks /delete /tn "PdfEditUpdate" /f >nul 2>nul
cls
TITLE ::7.开始清理注册表垃圾,请退出360等程序 By elvin[2016/10/25]::
ECHO .清理局域网共享痕迹
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WorkgroupCrawler\Shares" /f >nul 2>nul
ECHO .清理运行或操作历史记录--注册表 By elvin[2016/10/25]
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths" /va /f
ECHO .清理开始菜单最近的程序运行记录
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRU" /va /f
ECHO .文件打开与保存记录
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU" /va /f
ECHO .清理画图程序历史记录
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List" /va /f
ECHO .清理Windows搜索历史记录
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WordWheelQuery" /va /f
ECHO .清理IE浏览历史的下拉列表
reg delete "HKCU\Software\Microsoft\Internet Explorer\TypedUrls" /va /f
ECHO .清除WinRAR的历史记录
Rem 参数va为删除分支下所有键值
reg delete "HKCU\Software\WinRAR\DialogEditHistory\ExtrPath" /va /f
reg delete "HKCU\Software\WinRAR\DialogEditHistory\ArcName" /va /f
reg delete "HKCU\Software\WinRAR\ArcHistory" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\Folder" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.txt" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rar" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.mp3" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.mpg" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.jpg" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.png" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.bmp" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ini" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.doc" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.docx" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ppt" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.pptx" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.pst" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.eip" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.htm" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ico" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.iso" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.inf" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.gif" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.wav" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.xls" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.xlsx" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rm" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.zip" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rar" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\*" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\mp3" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\rm" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\wav" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\bat" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\exe" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\eip" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\ico" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\htm" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\jpg" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU" /va /f
reg delete HKCU\software\microsoft\windows\currentversion\explorer\userassist\{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}\count /va /f
reg delete HKCU\software\microsoft\windows\currentversion\explorer\userassist\{0D6D4F41-2994-4BA0-8FEF-620E43CD2812}\count /va /f
reg delete HKCU\software\microsoft\windows\currentversion\explorer\userassist\{5E6AB780-7743-11CF-A12B-00AA004AE837}\count /va /f
reg delete HKCU\software\microsoft\windows\currentversion\explorer\userassist\{75048700-EF1F-11D0-9888-006097DEACF9}\count /va /f
reg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentFileList" /va /f
reg delete "HKCU\Software\Microsoft\Microsoft Management Console\Recent File List" /va /f
reg delete "HKCU\Software\Microsoft\Office\11.0\PowerPoint\Recent File List" /va /f
reg delete "HKCU\Software\Microsoft\Office\11.0\Excel\Recent File" /va /f
reg delete "HKCU\Software\Microsoft\Office\11.0\Word\Data" /v "Settings" /f
reg delete "HKCU\Software\VMware, Inc." /va /f
cls
TITLE ::8.正在清理所有帐户下的临时文件,请稍候 By elvin[2016/10/25]::
ECHO ::8.正在清理所有帐户下的临时文件,请稍候 By elvin[2016/10/25]::
for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Documents and Settings\%%a\Cookies"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Recent"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Application Data\Microsoft\Office\Recent"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Application Data\Adobe\Acrobat\10.0\Cache"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temp"
cls
for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\History\"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temp"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temporary Internet Files"
for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Cookies\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Recent\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Application Data\Microsoft\Office\Recent\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Application Data\Adobe\Acrobat\10.0\Cache\*.*"
for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\History\"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temp\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Application Data\IconCache.db"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temporary Internet Files\*.*"
CLS
ver | find "6.1." > NUL && GOTO win8
ver | find "6.2." > NUL && GOTO win8
:win8
ECHO FOR Win7 or more
TITLE ::9.优化Win7和Win8系统::
ECHO .关闭远程差分API压缩,加快文件拷贝速度
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-RDC-Package~31bf3856ad364e35~x86~~6.2.9200.16384\Update" /v "MSRDC-Infrastructure" /t REG_DWORD /d 00000000 /f >nul 2>nul
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-RDC-Package~31bf3856ad364e35~x86~~6.1.7601.17514\Updates"/v MSRDC-Infrastructure /t REG_DWORD /d 00000000 /f >nul 2>nul
ECHO .Win7和Win8资源管理器中显示菜单
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v AlwaysShowMenus /t REG_DWORD /d 1 /f >nul 2>nul
echo.
ECHO .加快Aero Snap显示速度,更快看到窗口缩略图
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ExtendedUIHoverTime /t REG_DWORD /d 0 /f >nul 2>nul
ECHO .加快Aero Peek透视desktop功能的显示速度
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DesktopLivePreviewHoverTime /t REG_DWORD /d 0 /f >nul 2>nul
ECHO 清理侧边栏Gadgets
reg delete "HKLM\SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\Gadgets" /va /f >nul 2>nul
TITLE ::10.清理开始菜单快捷方式For Win7 or more::
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\AuthenTec TrueSuite"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\freeime"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Forefront"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Silverlight"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\games"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\搜狗拼音输入法"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Actify"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Catalyst Control Center"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\搜狗五笔输入法"
rd /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\世强软件"
rd /s /q "%SystemDrive%\ProgramData\Baidu\BaiduBrowserGA\AutoUpdate\updatelog\"
del /f /s /q "%SystemDrive%\Users\Public\Desktop\Adobe Reader*.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Windows Update.lnk"
del /f /s /q "%SystemDrive%\Users\Public\Desktop\PDFCreator.lnk"
del /f /s /q "%SystemDrive%\Users\Public\Desktop\PDFArchitect.lnk"
del /f /s /q "%SystemDrive%\Users\Public\Desktop\DWG TrueView*.lnk"
del /f /s /q "%SystemDrive%\Users\Public\Desktop\Autodesk Design Review.lnk"
del /f /s /q "%SystemDrive%\Users\Public\Desktop\SpinFire 9.0 Desktop.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Sidebar.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Update.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\XPS Viewer.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\*Media Center.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\*DVD Maker.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Adobe Reader*.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Movie Maker.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Messenger.lnk"
del /f /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\万能五笔输入法.lnk"
cls
TITLE ::11.清理Vista以上系统所有帐号的垃圾文件::
ECHO .清理Vista以上系统所有帐号的垃圾文件
dir "%SystemDrive%\users\" /ad /b >%SystemDrive%\DirTmp.txt
for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Microsoft\Windows\Recent"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Microsoft\Windows\Cookies"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Baidu\browser\profile\Cache"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Baidu\browser\profile\Application Cache\Cache"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\INetCache"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5"
for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\GPUCache"&rd /s /q "%SystemDrive%\ProgramData\Tencent\QQPinyin\Repair"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\History"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQ\Temp"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQ\STemp"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQ\AuTemp"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQ\webkit_cache"
cls
for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\History\"&del /s /f /q "%SystemDrive%\Users\%%a\AppData\Roaming\Microsoft\Windows\Recent\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\History\*.*"
for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "d:\KwDownload\Temp"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\SogouInput\Temp"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQPinyin\update"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Adobe\Flash Player\AssetCache"&rd /s /q "%SystemDrive%\Users\%%a%\AppData\Local\Packages\WinStore_cw5n1h2txyewy\AC\Microsoft\Windows Store\Cache"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Adobe\Flash Player\AssetCache"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Cache"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\JumpListIconsOld"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\JumpListIcons"&rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Local Storage\"
cls
for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Baidu\browser\profile\Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Media Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Terminal Server Client\Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\KuGou8\AddIns\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Outlook\*.ost"
for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Media Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\Application Data\Tencent\QQPCMgr\Download\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQPCMgr\Download\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\Logs\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQ\commonf_inst\*.*"
cls
for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Adobe\Acrobat\11.0\Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Adobe\Acrobat\10.0\Cache\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\LocalLow\Adobe\Acrobat\11.0\Search\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\LocalLow\Adobe\Acrobat\10.0\Search\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\WER\ReportQueue\*.*"
cls
for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Users\%%a\AppData\Roaming\Tencent\QQ\Misc\com.tencent.advertisement\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\Windows\Explorer\*.*"&del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Microsoft\TerminalServer Client\Cache\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\AppData\Local\Microsoft\OIS\*.*"
for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\Temp\*.*"&for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\WebCache\"&for /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Users\%%a\AppData\Local\WebCache\*.*"
cls
TITLE ::12.清理系统垃圾文件::
ECHO .清理系统补丁记录
del /f /s /q "%windir%\SoftwareDistribution\DataStore\Logs\*.*"
ECHO .清理日志文件
del /f /s /q "%windir%\System32\LogFiles\Scm\*.*"
del /f /s /q "%windir%\System32\Logs\CBS\*.*"
del /f /s /q "%windir%\Debug\netlogon.log"
del /f /s /q "%windir%\Debug\NetSetup.LOG"
del /f /s /q "%windir%\security\logs\diagnosis.log"
del /f /s /q "%windir%\security\logs\winlogon.log"
del /f /s /q "%windir%\Logs\CBS\CBS.log"
del /f /s /q "%windir%\inf\setupapi.app.log"
ECHO .清理微软病毒库Windows Defender
rd /s /q "%SystemRoot%\ProgramData\Microsoft\Windows Defender\Definition Updates"
ECHO .清理内存转存文件(蓝屏记录文件)
::del /f /s /q "%windir%\*.DMP"
GOTO finish
goto end
:finish
echo .清理缩略图缓存
ECHO 为安全起见,以下清理操作只对当前登录帐户有效
del /f /s /q "%temp%\*.*"
ECHO .清理系统盘无用文件
SFC /purgecache
ECHO .清理系统升级补丁目录(Windows目录)
dir %SystemRoot%\$*$ /ad/b >%SystemRoot%\update.txt
for /f %%a in (%SystemRoot%\update.txt) do rd /s /q "%SystemRoot%\%%a"
cls
ECHO .清理Windows自动更新缓存文件
rd /s /q "%SystemRoot%\SoftwareDistribution\Download\"&md "%SystemRoot%\SoftwareDistribution\Download"
ECHO .清理磁盘错误检测文件
dir %SystemDrive%\found.??? /ad/b >%systemDrive%\found.txt
for /f %%a in (%systemDrive%\found.txt) do rd /s /q "%systemDrive%\%%a"
::del /f /s /q %systemdrive%\*.chk
::del /f /s /q %systemdrive%\*.old
::del /f /s /q %windir%\*.bak
TITLE ::13.删除系统驱动和安装文件备份文件,释放空间 By elvin[2016/10/25]::
ECHO .删除系统驱动和安装文件备份文件,释放空间
rd /s /q %SystemDrive%\swsetup\
rd /s /q "%SystemDrive%\Program Files\HP\Temp"
::rd /s /q "%SystemDrive%\Program Files\OCSetup"
echo.
cls
TITLE ::14.正在清理常见系统垃圾文件,请退出360等程序 By elvin[2016/10/25]::
ECHO 14.正在清理常见系统垃圾文件,请退出360等程序
rem del /f /q "%ALLUSERSPROFILE%\Documents\DrWatson\*.*" >nul 2>nul
ECHO .清理索引文件
::del /f /s /q %systemdrive%\*.gid
ECHO .清理开始菜单文档列表中的记录
del /f /s /q %userprofile%\Recent\*.*
ECHO .清理动态缓存文件
del /f /s /q %windir%\system32\dllcache\*.*
ECHO .清理页面文件
del /f /s /q %windir%\prefetch\*.*
ECHO .清理系统临时文件
del /f /s /q %windir%\temp\*.*
del /f /s /q %systemdrive%\*.tmp
rem 用于服务器时请删除下面这一条!
::del /f /s /q %windir%\*.log
ECHO .清理系统盘回收站
del /f /s /q %systemdrive%\RECYCLER\*.*
rd /s /q %systemdrive%\$RECYCLE.BIN
del /f /s /q %systemdrive%\$RECYCLE.BIN\*.*
::del /f /s /q %systemdrive%\update.txt
::del /f /s /q %systemdrive%\found.txt
::del /f /s /q %systemdrive%\helpfound.txt
::for /f %%a in (%SystemDrive%\DirTmp.txt) do rd /s /q "%SystemDrive%\Users\%%a\AppData\Local\Temp\"
::del /f /s /q %systemdrive%\DirTmp.txt
cls
ECHO 15.正在进行最后一步——磁盘清理,完成后自动退出 By elvin[2016/10/25]
ECHO 当耗时越长时,说明你系统垃圾越多,请耐心等待程序执行完毕。。。
TITLE 15.正在进行最后一步——磁盘清理,完成后自动退出 By elvin[2016/10/25]
cleanmgr /sagerun:99
exit
|