@echo off
mode con lines=70 cols=60
color 2f
:main
cls
echo.
echo. *** Windows 7 优化设置 ***
echo.-----------------------------------------------------------
echo.Author: Cheney_Yang
echo.Feedback E-mail:yangcheney@qq.com
echo.Copyright (c) 2016-2017 Cheney_Yang. All rights reserved.
echo.-----------------------------------------------------------
echo.注意:如有360,电脑管家等安全软件提醒请勾选信任允许和不再提醒
echo.-----------------------------------------------------------
color 0a
echo.请选择对应的号码使用:
echo.
echo. 1.关闭防火墙以及提示
echo.
echo. 2.禁止系统自动更新
echo.
echo. 3.关闭打开文件安全警告
echo.
echo. 4.去除桌面图标上的快捷方式箭头
echo.
echo. 5.任务栏使用小图标
echo.
echo. 6.使分页文件改为系统内存的三倍
echo.
echo. 7.一键使用以上所有优化
echo.-----------------------------------------------------------
if exist "%SystemRoot%\System32\choice.exe" goto Win7Choice
set /p choice=请输入数字并按回车键确认:
echo.
if %choice%==1 goto A
if %choice%==2 goto B
if %choice%==3 goto C
if %choice%==4 goto D
if %choice%==5 goto E
if %choice%==6 goto F
if %choice%==7 goto G
cls
"set choice="
echo 您输入有误,请重新选择。
ping 127.0.1 -n "1">nul
goto main
:Win7Choice
choice /c 7654321 /n /m "请输入相应数字:"
if errorlevel 7 goto G
if errorlevel 6 goto F
if errorlevel 5 goto E
if errorlevel 4 goto D
if errorlevel 3 goto C
if errorlevel 2 goto B
if errorlevel 1 goto A
cls
goto main
:A
cls
color 2f
netsh advfirewall set allprofiles state off
echo.-----------------------------------------------------------
echo.
echo 恭喜您,关闭防火墙以及提示成功!!!
echo.
:host B
cls
color 2f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 1 /f
echo.-----------------------------------------------------------
echo.
echo 恭喜您,禁止系统自动更新成功 !!!
echo.
pause
:host C
cls
color 2f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations /v ModRiskFileTypes /t REG_SZ /d .exe;.bat;.vbs /f gpupdate /force
echo.-----------------------------------------------------------
echo.
echo 恭喜您,关闭打开文件安全警告成功 !!!
echo.
:host D
cls
color 2f
cmd /k reg delete "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /f & taskkill /f /im explorer.exe & start explorer.exe
echo.-----------------------------------------------------------
echo.
echo 恭喜您,去除桌面图标上的快捷方式箭头成功!!!
echo.
echo.重启后生效。
:host E
cls
color 2f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarSmallIcons /t REG_DWORD /d 1 /f
echo.-----------------------------------------------------------
echo.
echo 恭喜您,任务栏使用小图标成功!!!
echo.
echo.重启Explorer生效。
echo.
:host F
cls
color 2f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d 15000 /f
echo.-----------------------------------------------------------
echo.
echo 恭喜您,优化分页文件成功!!!
echo.
:host G
cls
color 2f
netsh advfirewall set allprofiles state off
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 1 /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations /v ModRiskFileTypes /t REG_SZ /d .exe;.bat;.vbs /f gpupdate /force
cmd /k reg delete "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /f & taskkill /f /im explorer.exe & start explorer.exe
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarSmallIcons /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d 15000 /f
echo.-----------------------------------------------------------
echo.
echo 恭喜您,一键优化成功!
echo.
echo.任务栏使用小图标,去除桌面图标上的快捷方式箭头功能,重启生效。
echo.
echo.
:end
echo 请按任意键退出。
@Pause>nul
原文:http://www.cnblogs.com/YangGC/p/6390349.html