您现在的位置是:首页 > 随手笔记网站首页随手笔记
Win10/Win11 一键系统深度优化
Win10/Win11 一键系统深度优化教程兼顾防自动更新、系统提速、界面美化、稳定挂机,全程不破坏核心服务,软件兼容无异常一、优化功能清单温和阻断系统更新更新校验时效锁定至...
Win10/Win11 终极一键工具箱
集系统深度优化、防自动更新、桌面美化、右键菜单优化、性能提速、C 盘垃圾清理一体,保留核心服务,兼容性强
功能一览
温和拦截系统更新,时效锁定至 2042 年,不关闭核心服务,杜绝软件报错
关闭防火墙、智能应用管控、SmartScreen,解除程序运行限制
电源设为永不休眠,显示器、硬盘不会自动断电
去除快捷方式小箭头,桌面观感清爽
Win11 右键默认展开完整菜单,无需点击更多选项
精简后台驻留、弹窗推送、数据遥测,释放硬件资源
关闭冗余检索、磁盘自动整理、UAC 弹窗,降低磁盘读写
网络参数优化,降低延迟,提升联网响应速度
安全清理 C 盘缓存、日志、回收站、浏览器垃圾,释放存储空间
使用教程
桌面右键新建文本文档
复制完整代码粘贴
另存为
系统终极工具箱.bat,保存类型选所有文件,编码 ANSI右键脚本,以管理员身份运行
执行完毕重启电脑,全部配置生效
一键优化脚本
@echo off
chcp 65001
title Windows终极优化+垃圾清理工具箱
net session >nul 2>&1
if %errorLevel% neq 0 (
echo 必须右键以管理员身份运行!
pause
exit
)
echo ====================
echo 开始系统深度优化
echo ====================
::锁定更新校验时效至2042年
reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v ExpiredUpdatesIgnoreDeadline /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpdatesExpiryYear /t REG_DWORD /d 2042 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferQualityUpdatesExpiryYear /t REG_DWORD /d 2042 /f
::策略限制自动更新,保留服务保障兼容
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DisableWindowsUpdateAccess /t REG_DWORD /d 1 /f
::屏蔽微软更新服务器域名
echo 0.0.0.0 windowsupdate.microsoft.com >>C:\Windows\System32\drivers\etc\hosts
echo 0.0.0.0 update.microsoft.com >>C:\Windows\System32\drivers\etc\hosts
echo 0.0.0.0 dl.delivery.mp.microsoft.com >>C:\Windows\System32\drivers\etc\hosts
::禁用更新自动扫描任务
schtasks /change /tn "\Microsoft\Windows\WindowsUpdate\Scheduled Start" /disable 2>nul
schtasks /change /tn "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan" /disable 2>nul
::关闭系统防火墙
netsh advfirewall set allprofiles state off
::关闭应用与浏览器智能控制
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\SmartScreen" /v ConfigureSmartScreen /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v SmartScreenEnabled /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v VerifiedAndReputablePolicyState /t REG_DWORD /d 0 /f
::电源全部设为永不休眠
powercfg /change monitor-timeout-ac 0
powercfg /change disk-timeout-ac 0
powercfg /change standby-timeout-ac 0
powercfg /change hibernate-timeout-ac 0
powercfg /change monitor-timeout-dc 0
powercfg /change disk-timeout-dc 0
powercfg /change standby-timeout-dc 0
powercfg /change hibernate-timeout-dc 0
powercfg /h off
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f
::关闭错误报告与弹窗通知
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications" /v ToastEnabled /t REG_DWORD /d 0 /f
::限制后台应用运行,关闭虚拟内存自动管理
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
wmic computersystem set AutomaticManagedPagefile=FALSE
::关闭Defender防护与用户数据遥测
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v DisableRealtimeMonitoring /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
::关闭搜索索引、自动磁盘整理
sc config WSearch start= disabled
net stop WSearch
reg add "HKLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction" /v Enable /t REG_SZ /d N /f
::关闭UAC账户控制弹窗
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f
::网络参数优化
netsh int tcp set global autotuninglevel=disabled
netsh int tcp set global congestionprovider=none
::Win11右键默认展开完整菜单
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /f
::重启资源管理器生效界面设置
taskkill /f /im explorer.exe
start explorer.exe
echo ====================
echo 优化完成,开始清理C盘垃圾
echo ====================
::清理系统临时文件
del /f /s /q %systemroot%\temp\*.*
del /f /s /q %systemroot%\Prefetch\*.*
del /f /s /q %temp%\*.*
del /f /s /q "%localappdata%\Temp\*.*"
::清理更新缓存与日志
del /f /s /q %systemroot%\SoftwareDistribution\Download\*.*
del /f /s /q %systemroot%\Logs\*.*
del /f /s /q %systemroot%\system32\LogFiles\*.*
::清理错误报告文件
del /f /s /q "%programdata%\Microsoft\Windows\WER\ReportArchive\*.*"
del /f /s /q "%programdata%\Microsoft\Windows\WER\ReportQueue\*.*"
::清空回收站
rd /s /q %systemdrive%\$Recycle.Bin
md %systemdrive%\$Recycle.Bin
::清理浏览器缓存
del /f /s /q "%localappdata%\Microsoft\Edge\User Data\Default\Cache\*.*"
del /f /s /q "%localappdata%\Google\Chrome\User Data\Default\Cache\*.*"
echo ====================
echo 全部操作执行完毕
echo 重启电脑即可生效
echo ====================
pause配套恢复默认脚本
保存为系统还原默认.bat,管理员运行恢复初始状态
@echo off
chcp 65001
net session >nul 2>&1
if %errorLevel% neq 0 (
echo 请以管理员身份运行!
pause
exit
)
::撤销更新时效锁定
reg delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v ExpiredUpdatesIgnoreDeadline /f 2>nul
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpdatesExpiryYear /f 2>nul
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferQualityUpdatesExpiryYear /f 2>nul
::清除更新限制策略
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /f 2>nul
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DisableWindowsUpdateAccess /f 2>nul
::清理域名屏蔽记录
findstr /v "microsoft.com" C:\Windows\System32\drivers\etc\hosts >C:\Windows\System32\drivers\etc\hosts.tmp
move C:\Windows\System32\drivers\etc\hosts.tmp C:\Windows\System32\drivers\etc\hosts /y
::恢复更新扫描任务
schtasks /change /tn "\Microsoft\Windows\WindowsUpdate\Scheduled Start" /enable 2>nul
schtasks /change /tn "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan" /enable 2>nul
::恢复Win11默认精简右键菜单
reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /va /f
taskkill /f /im explorer.exe
start explorer.exe
echo 系统已还原官方默认配置
pause下一篇:已经是最后一篇
相关文章
文章评论 (0)
- 这篇文章还没有收到评论,赶紧来抢沙发吧~

