怎样用bat优化+删除+倒计时重启?
问题1:怎样用bat程序自动优化系统→自动快速删除文件→自动倒计时重启?(要全自动的)问题2:怎样改BAT文件的图标和假后缀?...
问题1:怎样用bat程序自动优化系统→自动快速删除文件→自动倒计时重启 ?(要全自动的)
问题2:怎样改BAT文件的图标和假后缀? 展开
问题2:怎样改BAT文件的图标和假后缀? 展开
展开全部
你的问题太笼统了哦
慢慢给你回答。
问题1:
执行效果为
优化系统服务=优化系统=删除垃圾文件=倒计时60秒重启
部分内容你可以自己删除,比如更改我的文档到D盘等。
复制此段代码到记事本,保存为bat文件运行
@echo off
echo 开始进行优化系统服务...
:optimize
cls
sc config Alerter start= DISABLED
sc config ALG start= DISABLED
sc config AppMgmt start= DEMAND
sc config AudioSrv start= AUTO
sc config BITS start= DEMAND
sc config Browser start= DISABLED
sc config CiSvc start= DISABLED
sc config ClipSrv start= DISABLED
sc config COMSysApp start= DEMAND
sc config CryptSvc start= DEMAND
sc config DcomLaunch start= AUTO
sc config Dhcp start= DISABLED
sc config dmadmin start= DEMAND
sc config dmserver start= DISABLED
sc config Dnscache start= DISABLED
sc config ERSvc start= DISABLED
sc config Eventlog start= AUTO
sc config EventSystem start= DISABLED
sc config FastUserSwitchingCompatibility start= DISABLED
sc config helpsvc start= DISABLED
sc config HidServ start= DISABLED
sc config HTTPFilter start= DEMAND
sc config ImapiService start= DISABLED
sc config lanmanserver start= DISABLED
sc config lanmanworkstation start= AUTO
sc config LmHosts start= DISABLED
sc config Messenger start= DISABLED
sc config mnmsrvc start= DISABLED
sc config MSDTC start= DISABLED
sc config MSIServer start= DEMAND
sc config NetDDE start= DISABLED
sc config NetDDEdsdm start= DISABLED
sc config Netlogon start= DISABLED
sc config Netman start= DEMAND
sc config Nla start= DISABLED
sc config NtLmSsp start= DISABLED
sc config NtmsSvc start= DEMAND
sc config Nvsvc start= DISABLED
sc config Ose start= DEMAND
sc config PlugPlay start= AUTO
sc config PolicyAgent start= DISABLED
sc config ProtectedStorage start= DISABLED
sc config RasAuto start= DEMAND
sc config RasMan start= DEMAND
sc config RDSessMgr start= DISABLED
sc config RemoteAccess start= DISABLED
sc config RemoteRegistry start= DISABLED
sc config RpcLocator start= DEMAND
sc config RpcSs start= AUTO
sc config SamSs start= DISABLED
sc config SCardSvr start= DISABLED
sc config Schedule start= DISABLED
sc config seclogon start= DISABLED
sc config SENS start= DISABLED
sc config SharedAccess start= DISABLED
sc config ShellHWDetection start= DISABLED
sc config Spooler start= DEMAND
sc config srservice start= DISABLED
sc config SSDPSRV start= DISABLED
sc config Stisvc start= DISABLED
sc config Swprv start= DISABLED
sc config SysmonLog start= DISABLED
sc config TapiSrv start= DEMAND
sc config TermService start= DISABLED
sc config Themes start= AUTO
sc config TlntSvr start= DISABLED
sc config TrkWks start= DISABLED
sc config UMWdf start= DISABLED
sc config upnphost start= DEMAND
sc config UPS start= DISABLED
sc config VSS start= DISABLED
sc config W32Time start= DISABLED
sc config WebClient start= DISABLED
sc config winmgmt start= AUTO
sc config WmdmPmSN start= DISABLED
sc config Wmi start= DEMAND
sc config WmiApSrv start= DISABLED
sc config wuauserv start= DISABLED
sc config WZCSVC start= DISABLED
sc config wscsvc start= DISABLED
sc config xmlprov start= DEMAND
echo 优化XP系统服务结束,按任意键返回!
pause >nul
goto start2
:start2
cls
echo 开始进行其它优化...
taskkill /im TIMPlatform.exe /f
del /f /s /q C:\Progra~1\Tencent\QQ\TIMPlatform.exe
del /f /s /q D:\Progra~1\Tencent\QQ\TIMPlatform.exe
taskkill /im realsched.exe /f
del /f /s /q C:\Progra~1\Common~1\Real\Update_OB\realsched.exe
@rem 删除运行QQ和Real时启动的多余程序
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f
reg delete HKCR\Software\Microsoft\Windows\CurrentVersion\Run /va /f
reg delete "HKLM\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg" /f
del "C:\Documents and Settings\All Users\「开始」菜单\程序\启动\*.*" /q /f
del "C:\Documents and Settings\Default User\「开始」菜单\程序\启动\*.*" /q /f
del "%userprofile%\「开始」菜单\程序\启动\*.*" /q /f
@rem 删除多余的启动项
regsvr32 /u /s igfxpph.dll
reg delete HKCR\Directory\Background\shellex\ContextMenuHandlers /f
reg add HKCR\Directory\Background\shellex\ContextMenuHandlers\new /ve /d {D969A300-E7FF-11d0-A93B-00A0C90F2719}
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v HotKeysCmds /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IgfxTray /f
@rem 删除桌面多余的右键菜单
sfc /purgecache
@rem 消除系统缓存
regsvr32 /u /s zipfldr.dll
@rem 取消ZIP文件夹功能
reg add "HKCU\Control Panel\Desktop" /v AutoEndTasks /t REG_DWORD /d 1 /f
reg add "HKCU\Control Panel\Desktop" /v HungAppTimeout /d 50 /f
reg add "HKCU\Control Panel\Desktop" /v WaitToKillAppTimeout /d 200 /f
@rem 加快关机速度
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 1 /f
@rem 启动条滚动一次
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer /v AlwaysUnloadDLL /t REG_DWORD /d 1 /f
@rem 清除内存中不被使用的DLL文件
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /d 0 /f
@rem 关闭华医生
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v SFCDisable /t REG_DWORD /d 4294967197 /f
@rem 禁用文件保护
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPer1_0Server /t REG_DWORD /d 8 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPerServer /t REG_DWORD /d 8 /f
@rem IE下载多线程
reg add HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer /v Link /t REG_BINARY /d 00000000 /f
@rem 去掉快捷方式字样
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer /v NoLowDiskSpaceChecks /t REG_DWORD /d 1 /f
@rem 取消磁盘空间太小提示
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v ConfigFileAllocSize /t REG_DWORD /d 500 /f
@rem 优化文件系统
reg add HKCU\Console /v LoadConIme /t REG_DWORD /d 0 /f
@rem 运行CMD时不自动加载Conime
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system /v dontdisplaylastusername /t REG_DWORD /d 1 /f
@rem 不显示上次登陆用户名
reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v restrictanonymous /t REG_DWORD /d 1 /f
@rem 不允许 SAM帐户和共享的匿名枚举
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v AutoReboot /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v CrashDumpEnabled /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v DumpFile /t REG_EXPAND_SZ /d %SystemRoot%\MEMORY.DMP /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v LogEvent /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v MinidumpDir /t REG_EXPAND_SZ /d %SystemRoot%\Minidump /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v Overwrite /t REG_DWORD /d 1 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v SendAlert /t REG_DWORD /d 0 /f
@rem 系统失败的几个勾全都不选
reg add HKLM\SOFTWARE\Microsoft\PCHealth\ErrorReporting /v DoReport /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Microsoft\PCHealth\ErrorReporting /v ShowUI /t REG_DWORD /d 0 /f
@rem 禁用错误汇报,但在发生严重错误时通知我的勾不选
reg add HKCR\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103} /v SortOrderIndex /t REG_DWORD /d 54 /f
@rem 桌面第一显示我的电脑
reg add HKLM\SOFTWARE\Classes\*\shell\OpenInNotepad /ve /d 使用记事本打开 /f
reg add HKLM\SOFTWARE\Classes\*\shell\OpenInNotepad\command /ve /d "notepad.exe \"%%1%\"" /f
reg add HKCR\Directory\shell\DOS /ve /d 使用DOS浏览 /f
reg add HKCR\Directory\shell\DOS\Command /ve /d "cmd.exe /k \"cd %%L%" /f
@rem 在文件右键菜单增加"使用记事本打开"&在文件夹右键增加使用DOS浏览
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Favorites /t REG_EXPAND_SZ /d D:\Favorites /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /t REG_EXPAND_SZ /d "D:\My Documents" /f
@rem 将我的文档与收藏夹放在D盘下
echo 其它优化结束,按任意键返回!
pause >nul
goto del
:del
cls
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.
pause >nul
goto shutdown
:shutdown
shutdown -r -t 60
问题2:
这个网上不好找,你发邮件给我我传个文件给你
szpmsn@msn.com
慢慢给你回答。
问题1:
执行效果为
优化系统服务=优化系统=删除垃圾文件=倒计时60秒重启
部分内容你可以自己删除,比如更改我的文档到D盘等。
复制此段代码到记事本,保存为bat文件运行
@echo off
echo 开始进行优化系统服务...
:optimize
cls
sc config Alerter start= DISABLED
sc config ALG start= DISABLED
sc config AppMgmt start= DEMAND
sc config AudioSrv start= AUTO
sc config BITS start= DEMAND
sc config Browser start= DISABLED
sc config CiSvc start= DISABLED
sc config ClipSrv start= DISABLED
sc config COMSysApp start= DEMAND
sc config CryptSvc start= DEMAND
sc config DcomLaunch start= AUTO
sc config Dhcp start= DISABLED
sc config dmadmin start= DEMAND
sc config dmserver start= DISABLED
sc config Dnscache start= DISABLED
sc config ERSvc start= DISABLED
sc config Eventlog start= AUTO
sc config EventSystem start= DISABLED
sc config FastUserSwitchingCompatibility start= DISABLED
sc config helpsvc start= DISABLED
sc config HidServ start= DISABLED
sc config HTTPFilter start= DEMAND
sc config ImapiService start= DISABLED
sc config lanmanserver start= DISABLED
sc config lanmanworkstation start= AUTO
sc config LmHosts start= DISABLED
sc config Messenger start= DISABLED
sc config mnmsrvc start= DISABLED
sc config MSDTC start= DISABLED
sc config MSIServer start= DEMAND
sc config NetDDE start= DISABLED
sc config NetDDEdsdm start= DISABLED
sc config Netlogon start= DISABLED
sc config Netman start= DEMAND
sc config Nla start= DISABLED
sc config NtLmSsp start= DISABLED
sc config NtmsSvc start= DEMAND
sc config Nvsvc start= DISABLED
sc config Ose start= DEMAND
sc config PlugPlay start= AUTO
sc config PolicyAgent start= DISABLED
sc config ProtectedStorage start= DISABLED
sc config RasAuto start= DEMAND
sc config RasMan start= DEMAND
sc config RDSessMgr start= DISABLED
sc config RemoteAccess start= DISABLED
sc config RemoteRegistry start= DISABLED
sc config RpcLocator start= DEMAND
sc config RpcSs start= AUTO
sc config SamSs start= DISABLED
sc config SCardSvr start= DISABLED
sc config Schedule start= DISABLED
sc config seclogon start= DISABLED
sc config SENS start= DISABLED
sc config SharedAccess start= DISABLED
sc config ShellHWDetection start= DISABLED
sc config Spooler start= DEMAND
sc config srservice start= DISABLED
sc config SSDPSRV start= DISABLED
sc config Stisvc start= DISABLED
sc config Swprv start= DISABLED
sc config SysmonLog start= DISABLED
sc config TapiSrv start= DEMAND
sc config TermService start= DISABLED
sc config Themes start= AUTO
sc config TlntSvr start= DISABLED
sc config TrkWks start= DISABLED
sc config UMWdf start= DISABLED
sc config upnphost start= DEMAND
sc config UPS start= DISABLED
sc config VSS start= DISABLED
sc config W32Time start= DISABLED
sc config WebClient start= DISABLED
sc config winmgmt start= AUTO
sc config WmdmPmSN start= DISABLED
sc config Wmi start= DEMAND
sc config WmiApSrv start= DISABLED
sc config wuauserv start= DISABLED
sc config WZCSVC start= DISABLED
sc config wscsvc start= DISABLED
sc config xmlprov start= DEMAND
echo 优化XP系统服务结束,按任意键返回!
pause >nul
goto start2
:start2
cls
echo 开始进行其它优化...
taskkill /im TIMPlatform.exe /f
del /f /s /q C:\Progra~1\Tencent\QQ\TIMPlatform.exe
del /f /s /q D:\Progra~1\Tencent\QQ\TIMPlatform.exe
taskkill /im realsched.exe /f
del /f /s /q C:\Progra~1\Common~1\Real\Update_OB\realsched.exe
@rem 删除运行QQ和Real时启动的多余程序
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f
reg delete HKCR\Software\Microsoft\Windows\CurrentVersion\Run /va /f
reg delete "HKLM\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg" /f
del "C:\Documents and Settings\All Users\「开始」菜单\程序\启动\*.*" /q /f
del "C:\Documents and Settings\Default User\「开始」菜单\程序\启动\*.*" /q /f
del "%userprofile%\「开始」菜单\程序\启动\*.*" /q /f
@rem 删除多余的启动项
regsvr32 /u /s igfxpph.dll
reg delete HKCR\Directory\Background\shellex\ContextMenuHandlers /f
reg add HKCR\Directory\Background\shellex\ContextMenuHandlers\new /ve /d {D969A300-E7FF-11d0-A93B-00A0C90F2719}
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v HotKeysCmds /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IgfxTray /f
@rem 删除桌面多余的右键菜单
sfc /purgecache
@rem 消除系统缓存
regsvr32 /u /s zipfldr.dll
@rem 取消ZIP文件夹功能
reg add "HKCU\Control Panel\Desktop" /v AutoEndTasks /t REG_DWORD /d 1 /f
reg add "HKCU\Control Panel\Desktop" /v HungAppTimeout /d 50 /f
reg add "HKCU\Control Panel\Desktop" /v WaitToKillAppTimeout /d 200 /f
@rem 加快关机速度
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 1 /f
@rem 启动条滚动一次
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer /v AlwaysUnloadDLL /t REG_DWORD /d 1 /f
@rem 清除内存中不被使用的DLL文件
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /d 0 /f
@rem 关闭华医生
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v SFCDisable /t REG_DWORD /d 4294967197 /f
@rem 禁用文件保护
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPer1_0Server /t REG_DWORD /d 8 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPerServer /t REG_DWORD /d 8 /f
@rem IE下载多线程
reg add HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer /v Link /t REG_BINARY /d 00000000 /f
@rem 去掉快捷方式字样
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer /v NoLowDiskSpaceChecks /t REG_DWORD /d 1 /f
@rem 取消磁盘空间太小提示
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v ConfigFileAllocSize /t REG_DWORD /d 500 /f
@rem 优化文件系统
reg add HKCU\Console /v LoadConIme /t REG_DWORD /d 0 /f
@rem 运行CMD时不自动加载Conime
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system /v dontdisplaylastusername /t REG_DWORD /d 1 /f
@rem 不显示上次登陆用户名
reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v restrictanonymous /t REG_DWORD /d 1 /f
@rem 不允许 SAM帐户和共享的匿名枚举
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v AutoReboot /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v CrashDumpEnabled /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v DumpFile /t REG_EXPAND_SZ /d %SystemRoot%\MEMORY.DMP /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v LogEvent /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v MinidumpDir /t REG_EXPAND_SZ /d %SystemRoot%\Minidump /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v Overwrite /t REG_DWORD /d 1 /f
reg add HKLM\SYSTEM\ControlSet001\Control\CrashControl /v SendAlert /t REG_DWORD /d 0 /f
@rem 系统失败的几个勾全都不选
reg add HKLM\SOFTWARE\Microsoft\PCHealth\ErrorReporting /v DoReport /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Microsoft\PCHealth\ErrorReporting /v ShowUI /t REG_DWORD /d 0 /f
@rem 禁用错误汇报,但在发生严重错误时通知我的勾不选
reg add HKCR\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103} /v SortOrderIndex /t REG_DWORD /d 54 /f
@rem 桌面第一显示我的电脑
reg add HKLM\SOFTWARE\Classes\*\shell\OpenInNotepad /ve /d 使用记事本打开 /f
reg add HKLM\SOFTWARE\Classes\*\shell\OpenInNotepad\command /ve /d "notepad.exe \"%%1%\"" /f
reg add HKCR\Directory\shell\DOS /ve /d 使用DOS浏览 /f
reg add HKCR\Directory\shell\DOS\Command /ve /d "cmd.exe /k \"cd %%L%" /f
@rem 在文件右键菜单增加"使用记事本打开"&在文件夹右键增加使用DOS浏览
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Favorites /t REG_EXPAND_SZ /d D:\Favorites /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /t REG_EXPAND_SZ /d "D:\My Documents" /f
@rem 将我的文档与收藏夹放在D盘下
echo 其它优化结束,按任意键返回!
pause >nul
goto del
:del
cls
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.
pause >nul
goto shutdown
:shutdown
shutdown -r -t 60
问题2:
这个网上不好找,你发邮件给我我传个文件给你
szpmsn@msn.com
展开全部
要删除什么文件,你要说明呀,其实这些网上都是有的,你搜索一下再给它们组合就行了。
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在bat中输入以下命令就能自动倒计时30秒重启。
shutdown -t 30
shutdown -t 30
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
bat中 shutdown -t 30
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询