@echo off
set start=
set stop=
set pause=
set continue=
set exit=
:again
color 0e
setlocal EnableDelayedExpansion
cls
echo                         欢迎使用一键优化工具
echo               @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo               @                                      @
echo               @ 提示:                                @
echo               @      在运行本程序时会自动备份注册表  @
echo               @      到C盘根目录.                    @
echo               @                                      @
echo               @      欢迎访问http://g.51cto.com/hk   @
echo               @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo.
echo                                              BY:子旭
echo.
echo                         《优化项目编》
echo.
echo                        1.备份注册表
echo                        2.优化右键新建菜单多于项
echo                        3.优化开始菜单速度
echo                        4.优化关机速度
echo                        5.优化开机滚动条
echo                        6.优化网上邻居
echo                        7.优化开关机速度
echo                        8.加快预读能力改善开机速度
echo                        9.调解鼠标敏捷度
echo                       10.一键优化以上所有选项
echo                       11.退出程序
echo.
echo.
set /p num=请选择要执行的操作(请输入您要优化的编号并回车):
echo.
if "!num!"=="1" (
echo.
echo 请稍等,正在执行......
echo.
reg export hkcr c:\hkcr.reg > nul
reg export hkcu c:\hkcu.reg > nul
reg export hklm c:\hklm.reg > nul
reg export hku c:\hku.reg > nul
reg export hkcc c:\hkcc.reg > nul
echo 恭喜您~~已成功备份注册表到系统根目录! [请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="2" (
echo.
echo 请稍等,正在优化中......
reg delete hkcr\lnkfile /v isshortcut /f > nul
reg delete hkcr\piffile /v isshortcut /f > nul
reg delete hkcr\.bmp\ShellNew /f > nul
reg delete hkcr\.rar\ShellNew /f > nul
reg delete HKcr\.zip\ShellNew /f > nul
reg delete hkcr\.bfc\ShellNew /f > nul
reg delete hkcr\.rtf\ShellNew /f > nul
echo 成功删除右键新建菜单多于项![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="3" (
echo.
echo 请稍等,正在优化中......
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v MenuShowDelay /t REG_SZ /d 0 /f > nul
reg add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v MenuShowDelay /t REG_SZ /d 0 /f > nul
echo 成功优化开始菜单打开速度![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="4" (
echo.
echo 请稍等,正在优化中......
reg add hklm\SYSTEM\CurrentControlSet\Control /v WaitToKillServiceTimeout /t REG_SZ /d 5 /f > nul
echo 成功优化关机速度![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="5" (
echo.
echo 请稍等,正在优化中......
reg add "hklm\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 3 /f > nul
echo 成功优化开机滚动条![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="6" (
echo.
echo 请稍等,正在优化中......
reg delete "hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace" /f > nul
echo 成功优化网上邻居![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="7" (
echo.
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v AutoEndTasks /t REG_SZ /d 1 /f > nul
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v HungAppTimeout /t REG_SZ /d 200 /f > nul
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WaitToKillAppTimeout /t REG_SZ /d 1000 /f > nul
echo.
echo 成功优化开关机速度![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="8" (
echo.
del /f /s /q c:\windows\Prefetch\*.* > nul
echo 加快预读能力改善开机速度![请按任意键返回主菜单]
echo.
pause > nul
goto again
)
if "!num!"=="9" (
echo.
reg add "HKEY_CURRENT_USER\Control Panel\Mouse" /v DoubleClickSpeed /t REG_SZ /d 200 /f > nul
reg add "HKEY_CURRENT_USER\Control Panel\Mouse" /v MouseSensitivity /t REG_SZ /d 20 /f > nul
echo.
echo 成功调解鼠标速度![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="10" (
echo.
echo 正在优化中,请稍等......
echo.
reg export hkcr c:\hkcr.reg > nul
reg export hkcu c:\hkcu.reg > nul
reg export hklm c:\hklm.reg > nul
reg export hkcc c:\hkcc.reg > nul
reg export hkcr c:\hkcr.reg > nul
echo 恭喜您~~已成功备份注册表到系统根目录!
echo.
reg delete hkcr\lnkfile /v isshortcut /f > nul
reg delete hkcr\piffile /v isshortcut /f > nul
reg delete hkcr\.bmp\ShellNew /f > nul
reg delete hkcr\.rar\ShellNew /f > nul
reg delete HKcr\.zip\ShellNew /f > nul
reg delete hkcr\.bfc\ShellNew /f > nul
reg delete hkcr\.rtf\ShellNew /f > nul
echo 成功删除右键新建菜单多于项!
echo.
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v MenuShowDelay /t REG_SZ /d 0 /f > nul
reg add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v MenuShowDelay /t REG_SZ /d 0 /f > nul
echo 成功优化开始菜单打开速度!
echo.
reg add hklm\SYSTEM\CurrentControlSet\Control /v WaitToKillServiceTimeout /t REG_SZ /d 5 /f > nul
echo 成功优化关机速度!
echo.
reg add "hklm\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 3 /f > nul
echo 成功优化开机滚动条!
echo.
reg delete "hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace" /f > nul
echo 成功优化网上邻居!
echo.
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v AutoEndTasks /t REG_SZ /d 1 /f > nul
echo.
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v HungAppTimeout /t REG_SZ /d 200 /f > nul
echo.
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WaitToKillAppTimeout /t REG_SZ /d 1000 /f > nul
echo.
echo 成功优化开关机速度!
echo.
del /f /s /q c:\windows\Prefetch\*.* > nul
echo 加快预读能力改善开机速度!
echo.
reg add "HKEY_CURRENT_USER\Control Panel\Mouse" /v DoubleClickSpeed /t REG_SZ /d 200 /f > nul
reg add "HKEY_CURRENT_USER\Control Panel\Mouse" /v MouseSensitivity /t REG_SZ /d 20 /f > nul
echo.
echo 成功调解鼠标速度!
echo.
echo 成功一键优化![请按任意键返回主菜单]
pause > nul
goto again
)
if "!num!"=="11" (
exit
)
if not "!num!"=="" (
echo 输入错误,请重新输入!
echo 请按任意键,返回主菜单!
pause > nul
goto again
)
if "!num!"=="" (
echo 输入错误,请重新输入!
echo 请按任意键,返回主菜单!
pause > nul
goto again
)
@echo off
color 27
:start
cls
echo *******************************************************************************
echo *                                                                             *
echo *                     BAT     加     密     最     终     版                         *
echo *                                                                             * 字串1
echo *******************************************************************************
echo.
echo.
echo BAT加密最终版为"BAT加密工具"的更新版本, 较上一版加密工具而言有诸多优势:
echo.
echo ★   可以一次性成功加密任何批处理文件, 更省事.
echo.
echo ★   可以由您输入任意需要加密的批处理, 加密灵活性更大.
echo.
echo ★   能够自动判断错误输入, 更加人性化.
echo.
echo 说明: 在下面输入需要加密的批处理文件, 直接输入批处理文件名为加密当前目录下的BAT,也可以带路径指定任意BAT. 当前目录下生成的encrypt.bat文件即为加密的批处理.
echo.
echo 
echo.
echo.
echo.
set /p file=请输入需要加密的批处理后按回车键(q=退出):
if "%file%"=="q" goto quit
echo %file%|findstr /i "\.bat$">nul && goto go
echo %file%|findstr /i "\.cmd$">nul && goto go
cls
echo ==============
echo 请正确输入!
echo ==============
echo.
字串4

echo.
echo 按任意键重新输入......
pause>nul
goto start
:go
if not exist "%file%" goto newly
if exist encrypt.bat copy encrypt.bat encryptbak.bat
echo %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a >"%tmp%\encrypt.tmp"
echo cls>>"%tmp%\encrypt.tmp"
字串2

type "%file%">>"%tmp%\encrypt.tmp"
setlocal enabledelayedexpansion
for %%i in ("%tmp%\encrypt.tmp") do (
     echo %%~zi >nul 2>nul
     set size=%%~zi
     set num=!size:~-1!
     set /a mod=!num!%%2
     if !mod! equ 0 (goto even) else (goto odd)
)
:even
copy "%tmp%\encrypt.tmp" encrypt.bat
del "%tmp%\encrypt.tmp"
cls
echo ==========================
echo 恭喜你, 批处理加密成功^^!
echo ==========================
echo.
echo.
echo 按任意键退出......
pause>nul
goto quit
:odd
echo. >>"%tmp%\encrypt.tmp"
copy "%tmp%\encrypt.tmp" encrypt.bat
del "%tmp%\encrypt.tmp"
cls
echo ==========================
echo 恭喜你, 批处理加密成功^^!
echo ==========================
echo.
echo.
字串9

echo 按任意键退出......
pause>nul
goto quit
:newly
cls
echo ================================
echo 找不到批处理文件, 请重新输入!
echo ================================
echo.
echo.
echo 按任意键开始......
pause>nul
goto start
:quit
exit