優化bat
1. 麻煩幫忙優化下bat腳本
用XCOPY 命令,加上 /D參數,只復制源文件時間比目標時間新的文件。
2. bat 進程管理(優化)
TaskKill /m Notepad.exe
或者
ntsd -c q -pn Notepad.exe
3. 系統優化BAT指令
是清理系統垃圾么? 以下代碼
@echo off
echo 正在清除系統垃圾文件,請稍等......
del /f /s /q %systerive%\*.tmp
del /f /s /q %systerive%\*._mp
del /f /s /q %systerive%\*.log
del /f /s /q %systerive%\*.gid
del /f /s /q %systerive%\*.chk
del /f /s /q %systerive%\*.old
del /f /s /q %systerive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & %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 清除系統LJ完成!
echo. & pause
4. 批處理,bat腳本啟動優化,會的盡管來,搞定賞高分!
@echoon
lsnrctlstart
@pause
runas/savecred/user:devadm"cmd/ccd/dD:oracleDEV11204BIN&sqlplus"/assysdba"@Open.bat"
5. 求 windows7 服務優化BAT (軟體精通者請進)
@echo off
color 0A
title Windos Seven 服務優化批處理 --當前時間:%time%
echo ========================================================================
echo Windos Seven 服務優化批處理
echo ========================================================================
echo.
echo 與Windows XP和Windows 2003才七十多個服務相比,Windos Vista已經增加到一百三十多個服務,而Windos Seven也繼續繼承了這一特點,這不可避免地加大了系統資源佔用,拖慢了系統速度,因此,手工優化服務就顯得更加重要。
echo.
echo 默認開啟AERO,開啟自動更新(檢查更新但讓我選擇是否下載和安裝)。
echo.
echo 其他的服務,可以具體的根據自己的需要來定製。。。。。
echo.
echo.
echo 開始進行系統服務優化……
echo.
echo.
echo.
pause
:return
cls
@echo off
color 0A
title Windos Seven 服務優化批處理 --當前時間:%time%
----end---------
另外一個。
Windows 7服務優化bat
@echo Restore The Service Start State Saved At 19:17:02.10 2011/01/23 周日
@pause
sc config AeLookupSvc start= DEMAND
sc config ALG start= DEMAND
sc config AppIDSvc start= DEMAND
sc config Appinfo start= DEMAND
sc config AppMgmt start= DEMAND
sc config AudioEndpointBuilder start= AUTO
sc config Audiosrv start= AUTO
sc config AxInstSV start= DEMAND
sc config BDESVC start= DEMAND
sc config BFE start= DISABLED
sc config BITS start= DISABLED
sc config Browser start= DISABLED
sc config bthserv start= DEMAND
sc config CertPropSvc start= DEMAND
sc config clr_optimization_v2.0.50727_32 start= AUTO
sc config COMSysApp start= DEMAND
sc config CryptSvc start= AUTO
sc config CscService start= DEMAND
sc config DcomLaunch start= AUTO
sc config defragsvc start= DEMAND
sc config Dhcp start= AUTO
sc config Dnscache start= AUTO
sc config dot3svc start= DEMAND
sc config DPS start= DISABLED
sc config EapHost start= DEMAND
sc config EFS start= DEMAND
sc config ehRecvr start= DEMAND
sc config ehSched start= DEMAND
sc config eventlog start= AUTO
sc config EventSystem start= DISABLED
sc config Fax start= DEMAND
sc config fdPHost start= DEMAND
sc config FDResPub start= DEMAND
sc config FontCache start= DEMAND
sc config FontCache3.0.0.0 start= DEMAND
sc config gpsvc start= AUTO
sc config hidserv start= DEMAND
sc config hkmsvc start= DEMAND
sc config HomeGroupListener start= DEMAND
sc config HomeGroupProvider start= DEMAND
sc config idsvc start= DEMAND
sc config IKEEXT start= DISABLED
sc config IPBusEnum start= DEMAND
sc config iphlpsvc start= DISABLED
sc config KeyIso start= DEMAND
sc config KtmRm start= DEMAND
sc config LanmanServer start= DISABLED
sc config LanmanWorkstation start= AUTO
sc config lltdsvc start= DEMAND
sc config lmhosts start= DISABLED
sc config Mcx2Svc start= DISABLED
sc config MMCSS start= AUTO
sc config MpsSvc start= DISABLED
sc config MSDTC start= DEMAND
sc config MSiSCSI start= DISABLED
sc config msiserver start= DEMAND
sc config napagent start= DISABLED
sc config Netlogon start= DEMAND
sc config Netman start= DEMAND
sc config netprofm start= DEMAND
sc config NetTcpPortSharing start= DISABLED
sc config NlaSvc start= AUTO
sc config nsi start= AUTO
sc config p2pimsvc start= DEMAND
sc config p2psvc start= DEMAND
sc config PcaSvc start= DEMAND
sc config PeerDistSvc start= DEMAND
sc config pla start= DEMAND
sc config PlugPlay start= AUTO
sc config PNRPAutoReg start= DEMAND
sc config PNRPsvc start= DEMAND
sc config PolicyAgent start= AUTO
sc config Power start= AUTO
sc config ProfSvc start= AUTO
sc config ProtectedStorage start= DEMAND
sc config QWAVE start= DEMAND
sc config RasAuto start= DEMAND
sc config RasMan start= DEMAND
sc config RemoteAccess start= DISABLED
sc config RemoteRegistry start= DISABLED
sc config RpcEptMapper start= AUTO
sc config RpcLocator start= DEMAND
sc config RpcSs start= AUTO
sc config SamSs start= AUTO
sc config SCardSvr start= DEMAND
sc config Schele start= AUTO
sc config SCPolicySvc start= DEMAND
sc config SDRSVC start= DEMAND
sc config seclogon start= DEMAND
sc config SENS start= AUTO
sc config SensrSvc start= DEMAND
sc config SessionEnv start= DEMAND
sc config SharedAccess start= DISABLED
sc config ShellHWDetection start= DISABLED
sc config SNMPTRAP start= DEMAND
sc config Spooler start= DISABLED
sc config sppsvc start= AUTO
sc config sppuinotify start= DEMAND
sc config SSDPSRV start= DISABLED
sc config SstpSvc start= DEMAND
sc config StiSvc start= DEMAND
sc config StorSvc start= DEMAND
sc config swprv start= DEMAND
sc config SysMain start= DISABLED
sc config TabletInputService start= DISABLED
sc config TapiSrv start= DEMAND
sc config TBS start= DEMAND
sc config TermService start= DEMAND
sc config Themes start= AUTO
sc config THREADORDER start= DEMAND
sc config TrkWks start= AUTO
sc config TrustedInstaller start= DEMAND
sc config UI0Detect start= DEMAND
sc config UmRdpService start= DEMAND
sc config upnphost start= DEMAND
sc config UxSms start= AUTO
sc config VaultSvc start= DEMAND
sc config vds start= DEMAND
sc config VSS start= DEMAND
sc config W32Time start= DEMAND
sc config wbengine start= DEMAND
sc config WbioSrvc start= DEMAND
sc config wcncsvc start= DEMAND
sc config WcsPlugInService start= DEMAND
sc config WdiServiceHost start= DEMAND
sc config WdiSystemHost start= DEMAND
sc config WebClient start= DISABLED
sc config Wecsvc start= DEMAND
sc config wercplsupport start= DEMAND
sc config WerSvc start= DEMAND
sc config WinDefend start= DISABLED
sc config WinHttpAutoProxySvc start= DEMAND
sc config Winmgmt start= AUTO
sc config WinRM start= DEMAND
sc config Wlansvc start= DEMAND
sc config wmiApSrv start= DEMAND
sc config WMPNetworkSvc start= DEMAND
sc config WPCSvc start= DEMAND
sc config WPDBusEnum start= DEMAND
sc config wscsvc start= DISABLED
sc config WSearch start= AUTO
sc config wuauserv start= DISABLED
sc config wudfsvc start= DEMAND
sc config WwanSvc start= DEMAND
@pause
6. 優化開機.bat
批處理的代碼啊。。這個沒有啊
7. 怎樣建立win7服務優化批處理.bat
@echo off
echo 服務優化正在處理,請稍等......
@echo
@pause
sc config ALG start= DEMAND
sc config AppMgmt start= DEMAND
sc config AudioEndpointBuilder start= AUTO
sc config Audiosrv start= AUTO
sc config BFE start= AUTO
sc config BITS start= AUTO
sc config Browser start= AUTO
sc config CertPropSvc start= DEMAND
sc config clr_optimization_v2.0.50727_32 start= DEMAND
sc config COMSysApp start= DEMAND
sc config CryptSvc start= AUTO
sc config DcomLaunch start= AUTO
sc config Dhcp start= AUTO
sc config Dnscache start= AUTO
sc config dot3svc start= DEMAND
sc config EapHost start= DEMAND
sc config EventSystem start= AUTO
sc config fdPHost start= DEMAND
sc config FDResPub start= DEMAND
sc config FontCache3.0.0.0 start= DEMAND
sc config gpsvc start= AUTO
sc config hidserv start= DEMAND
sc config hkmsvc start= DEMAND
sc config idsvc start= DEMAND
sc config IKEEXT start= AUTO
sc config IPBusEnum start= DEMAND
sc config KeyIso start= DEMAND
sc config LanmanServer start= AUTO
sc config LanmanWorkstation start= AUTO
sc config lltdsvc start= DEMAND
sc config lmhosts start= AUTO
sc config MMCSS start= AUTO
sc config MpsSvc start= AUTO
sc config msiserver start= DEMAND
sc config napagent start= DEMAND
sc config Netlogon start= DEMAND
sc config Netman start= DEMAND
sc config netprofm start= AUTO
sc config NetTcpPortSharing start= DISABLED
sc config NlaSvc start= AUTO
sc config NOD32krn start= AUTO
sc config nsi start= AUTO
sc config PlugPlay start= AUTO
sc config ProfSvc start= AUTO
sc config RasAuto start= DEMAND
sc config RasMan start= DEMAND
sc config RemoteAccess start= DISABLED
sc config RpcLocator start= DEMAND
sc config RpcSs start= AUTO
sc config SamSs start= AUTO
sc config SCardSvr start= DEMAND
sc config SCPolicySvc start= DEMAND
sc config SENS start= AUTO
sc config SharedAccess start= DISABLED
sc config ShellHWDetection start= AUTO
sc config slsvc start= AUTO
sc config SLUINotify start= DEMAND
sc config SNMPTRAP start= DEMAND
sc config SSDPSRV start= DEMAND
sc config SstpSvc start= DEMAND
sc config SysMain start= AUTO
sc config TapiSrv start= DEMAND
sc config TBS start= AUTO
sc config Themes start= AUTO
sc config THREADORDER start= DEMAND
sc config TrustedInstaller start= DEMAND
sc config upnphost start= DEMAND
sc config UxSms start= AUTO
sc config vds start= DEMAND
sc config W32Time start= AUTO
sc config wcncsvc start= DEMAND
sc config WcsPlugInService start= DEMAND
sc config WinHttpAutoProxySvc start= DEMAND
sc config Winmgmt start= AUTO
sc config Wlansvc start= DEMAND
sc config wmiApSrv start= DEMAND
sc config WMPNetworkSvc start= DEMAND
sc config wscsvc start= AUTO
sc config wuauserv start= AUTO
sc config wudfsvc start= DEMAND
@pause
echo.
echo.&echo 優化完成!任意鍵退出
echo. & pause>nul
把上面一段復制到記事本中保存為.bat文件即可
8. 幾個電腦系統優化清除垃圾bat命令介紹
一.清理垃圾
在電腦屏幕的左下角按「開始→程序→附件→記事本」,把下面的文字復制進去(黑色部分),點「另存為」,路徑選「桌面」,保存類型為「所有文件」,文件名為「清除系統LJ.bat」,就完成了。記住後綴名一定要是.bat,ok!你的垃圾清除器就這樣製作成功了!
二,優化開機
方法基本同第一,在電腦屏幕的左下角按「開始→程序→附件→記事本」,把下面的文字復制進去(黑色部分),點「另存為」,路徑選「桌面」,保存類型為「所有文件」,文件名為「優化開機.bat」,就完成了。記住後綴名一定要是.bat,ok!你的優化開機就這樣製作成功了!
三,清理常見病毒、插件和惡意代碼
方法基本也一樣,基本同第一,在電腦屏幕的左下角按「開始→程序→附件→記事本」,把下面的文字復制進去(黑色部分),點「另存為」,路徑選「桌面」,保存類型為「所有文件」,文件名為「殺毒.bat」,就完成了。記住後綴名一定要是.bat,ok!你的最簡單好用的殺毒軟體就這樣製作成功了!
9. 誰給我寫個史上最完整的電腦優化BAT!
@ ECHO.
@ ECHO.
@ ECHO. 說 明
@ ECHO --------------------------------------------------------------------------
@ ECHO IDE通道在這里看:設備管理器---IDE ATA/ATAPI控制器。一般可看到兩個或多個。
@ ECHO 其屬性內的「設備類型」,系統默認是「自動檢測」,把它設為「無」可以提高
@ ECHO 開機速度。但如果以後要接硬碟或光碟機,請記得把相應的通道改為「自動檢測」,
@ ECHO 否則進系統後看不到它們。
@ ECHO --------------------------------------------------------------------------
@ ECHO.
::::::::::::::::::::::::::::::::::::常用環境變數:::::::::::::::::::::::::::::::::::::::::::
:: ALLUSERSPROFILE=C:\Documents and Settings\All Users
:: APPDATA=C:\Documents and Settings\Administrator\Application Data
::::::::::::::::::::::::::::::批處理提示完成等信息的方法:::::::::::::::::::::::::::::::::::
:: echo intAnswer=Msgbox("1.***" ^& vbNewLine ^& "" ^& vbNewLine ^& "2.***", ok, "提示:")>"%TEMP%\inform.vbs"
:: attrib +H "%TEMP%\inform.vbs"
:: "%TEMP%\inform.vbs"
:: del /a /f "%TEMP%\inform.vbs"
::::::::::::::::::::::::::::::::::創建快捷方式的方法:::::::::::::::::::::::::::::::::::::::
:: sPath代表批處理所運行的位置,待創快捷方式程序與批處理在同目錄,否則要修改sPath後的路徑::
:: 如用%sPath%文件夾名稱\,若用Programs替換Desktop ,則在「開始--所有程序」中創建快捷方式::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: set sPath=%~dp0
:: echo On Error Resume Next>"%TEMP%\createcs.vbs"
:: echo attrib +H "%TEMP%\createcs.vbs"
:: echo Set Shell=CreateObject("WScript.Shell")>>"%TEMP%\createcs.vbs"
:: echo CsPath=Shell.SpecialFolders("Desktop")>>"%TEMP%\createcs.vbs"
:: echo Set link=Shell.CreateShortcut(CsPath ^& "\\程序名稱.lnk")>>"%TEMP%\createcs.vbs"
:: echo link.description="位置:"^& "%sPath%">>"%TEMP%\createcs.vbs"
:: echo link.TargetPath="%sPath%程序名稱.exe">>"%TEMP%\createcs.vbs"
:: echo link.WindowStyle=1 >>"%TEMP%\createcs.vbs"
:: echo link.WorkingDirectory=CsPath>>"%TEMP%\createcs.vbs"
:: echo link.Save>>"%TEMP%\createcs.vbs"
:: echo Set link2=Shell.CreateShortcut(CsPath ^& "\\程序名稱2.lnk")>>"%TEMP%\createcs.vbs"
:: echo link2.description="位置:"^& "%sPath%">>"%TEMP%\createcs.vbs"
:: echo link2.TargetPath="%sPath%程序名稱2.exe">>"%TEMP%\createcs.vbs"
:: echo link2.WindowStyle=1 >>"%TEMP%\createcs.vbs"
:: echo link2.WorkingDirectory=CsPath>>"%TEMP%\createcs.vbs"
:: echo link2.Save>>"%TEMP%\createcs.vbs"
:: "%TEMP%\createcs.vbs"
:: del /a /f "%TEMP%\createcs.vbs"
:::::::::::::::::::::::::注冊批處理所在目錄及其所有子目錄下DLL的方法::::::::::::::::::::::
:: if exist "%SystemDrive%\RegKJ.tmp" del /q "%SystemDrive%\RegKJ.tmp"
:: dir /s /b "*.dll">>"%SystemDrive%\RegKJ.tmp"
:: dir /s /b "*.ocx">>"%SystemDrive%\RegKJ.tmp"
:: for /f "delims=*" %%i in (%SystemDrive%\RegKJ.tmp) do Regsvr32 /s "%%i"
:: del /q "%SystemDrive%\RegKJ.tmp"
::::::::::::::::::::::::::用批處理安裝字體的方法-.\指批處理所在目錄:::::::::::::::::::::::
:: REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL" /V "CheckedValue" /T "REG_DWORD" /D "1" /F>NUL
:: IF NOT EXIST "%SystemRoot%\FONTS\DESKTOP.INI" ECHO [.ShellClassInfo]>"%SystemRoot%\FONTS\DESKTOP.INI" && ECHO UICLSID={BD84B380-8CA2-1069-AB1D-08000948F534}>>"%SystemRoot%\FONTS\DESKTOP.INI"
:: ATTRIB +H +R "%SystemRoot%\FONTS\DESKTOP.INI"
:: ATTRIB +H +R "%SystemRoot%\FONTS"
:: /Y .\字體所在目錄名稱\*.ttf "%SystemRoot%\fonts\"
:: start explorer "%SystemRoot%\fonts\"
:: echo set WshShell=createobject("wscript.shell")>"%temp%\$tep$.vbs"
:: attrib +H "%temp%\$tep$.vbs"
:: echo WshShell.AppActivate "FONTS">>"%temp%\$tep$.vbs"
:: echo WshShell.sendkeys "%%{f4}">>"%temp%\$tep$.vbs"
:: "%temp%\$tep$.vbs"
:: del /a /f "%temp%\$tep$.vbs"
:::::::::::::::::::::::::::::::::::開始執行代碼::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::路徑解析::::::::::::::::::::::::::::::::::::::
set CurPath=%~dp0
set CurPath=%CurPath:~0,-1%
set CurPath=%CurPath:\=\\%
set ALLUSERSPROFILE=%ALLUSERSPROFILE:\=\\%
set APPDATA=%APPDATA:\=\\%
set CommonProgramFiles=%CommonProgramFiles:\=\\%
set ProgramFiles=%ProgramFiles:\=\\%
set SystemRoot=%SystemRoot:\=\\%
set windir=%windir:\=\\%
set ComSpec=%ComSpec:\=\\%
set Path=%Path:\=\\%
set HOMEPATH=%HOMEPATH:\=\\%
set USERPROFILE=%USERPROFILE:\=\\%
::::::::::::::::::::::::在以下部分中需用%CurPath%替換批處理運行的路徑::::::::::::::
::::::::::::::::::::::::::::::::::在以下部分中需用%%1替換%1::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::導入注冊表::::::::::::::::::::::::::::::::::
if exist "%TEMP%\加速_安裝.reg" del /q "%TEMP%\加速_安裝.reg"
echo Windows Registry Editor Version 5.00>>"%TEMP%\加速_安裝.reg"
echo [HKEY_USERS\.DEFAULT\Control Panel\Desktop]>>"%TEMP%\加速_安裝.reg"
echo "AutoEndTasks"="1">>"%TEMP%\加速_安裝.reg"
echo [HKEY_USERS\.DEFAULT\Control Panel\Desktop]>>"%TEMP%\加速_安裝.reg"
echo "HungAppTimeout"="0">>"%TEMP%\加速_安裝.reg"
echo [HKEY_USERS\.DEFAULT\Control Panel\Desktop]>>"%TEMP%\加速_安裝.reg"
echo "WaitToKillAppTimeout"="0">>"%TEMP%\加速_安裝.reg"
echo [HKEY_USERS\.DEFAULT\Control Panel\Desktop]>>"%TEMP%\加速_安裝.reg"
echo "MenuShowDelay"="0">>"%TEMP%\加速_安裝.reg"
regedit /s "%TEMP%\加速_安裝.reg"
del /q "%TEMP%\加速_安裝.reg"
:: 修改IDE通道檢測設備模式,不接設備的設置為無,提高XP啟動速度
:: 建議在系統第二次重新啟動檢測到所有已經安裝的IDE設備後運行
::
:: Date: 2006.10.28
::
:: Date:2008.04.02
@echo off 改變bootini值
bootcfg /timeout 0
rem 恢復boot.ini的各種屬性
@echo off 清理垃圾
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\*.*"
del /f /s /q "D:\My Documents\Cookies\*.txt"
echo 系統垃圾清理完成!!!!!!!!! OK
echo 清除我的文檔記錄!
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V NORECENTDOCSHISTORY /T REG_DWORD /D 1 /F
@set _debug=
@echo %_debug% off & setlocal ENABLEDELAYEDEXPANSION
set hkey1=HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel
set hkey2=HKLM\SYSTEM\CurrentControlSet\Control\Class
echo 檢測開始.........
for /f "usebackq tokens=*" %%I in (`reg query %hkey1% ^| find /i "IDEChannel\"`) do call :_check "%%I"
@ ECHO.
@ ECHO.
@ ECHO.
echo IED通道檢測設備模式設置完成。
goto :eof
:_check
::echo %1
set subkey=
for /f "usebackq tokens=3*" %%J in (`reg query %1 ^| find /i "driver"`) do set subkey=%%J
set DriverDesc=
for /f "usebackq tokens=3,4*" %%K in (`reg query "%hkey2%\%subkey%" /v DriverDesc ^| find /i "driverdesc"`) do set DriverDesc=%%K %%L 通道
reg query "%hkey2%\%subkey%" /v MasterDeviceType | find /i "0x0" > nul
if not %errorlevel%==1 goto _ChgMaster
echo 「%DriverDesc%」的設備0上有設備存在。
goto _CheckSlave
:_ChgMaster
reg add "%hkey2%\%subkey%" /v UserMasterDeviceType /t REG_DWORD /d 3 /f >nul
echo 「%DriverDesc%」的設備0上無設備,系統「檢測方式」設置為無。
:_CheckSlave
reg query "%hkey2%\%subkey%" /v SlaveDeviceType | find /i "0x0" > nul
if not %errorlevel%==1 goto _ChgSlave
echo 「%DriverDesc%」的設備1上有設備存在。
goto :eof
:_ChgSlave
reg add "%hkey2%\%subkey%" /v UserSlaveDeviceType /t REG_DWORD /d 3 /f >nul
echo 「%DriverDesc%」的設備1上無設備,系統「檢測方式」設置為無。
goto :eof
@ ECHO. 摘抄著名:束繼濤 32240972
寫成bat格式保證好用