電腦運(yùn)行緩慢怎么解決
導(dǎo)讀:電腦在使用的過程中會產(chǎn)生很多垃圾,垃圾多了,電腦運(yùn)行的速度就慢得厲害了!現(xiàn)在我們可以用一個小程序來把這些垃圾從我們的電腦里清除掉!下面小編來教大家這么制作這個小程序,希望對大家有幫助。
工具/原料
文本文檔文件一個
步驟/方法
首先我們就新建一個文本文檔文件!我們鼠標(biāo)右鍵就能新建一個文本文檔文件了!我們可以在桌面鼠標(biāo)右鍵菜單,選擇“新建”,然后再選擇“文本文檔”!就能在桌面新一個空白的文本文檔文件了!
現(xiàn)在我們就要打開新建的文本文檔文件!里面什么都沒有,空空如也!我們要在這里進(jìn)行編輯啦!在文本文檔文件里輸入一些程序代碼!這些代碼如下!
@ECHO off
color 0a
::echo 當(dāng)前帳戶:%username%
ECHO.
echo 請選擇是否用于服務(wù)器:
echo.
echo 1.是服務(wù)器-- 按任意數(shù)字鍵
echo 2.非服務(wù)器-- 按回車或其它任意鍵
echo.
set /p s=請選擇:
echo %s%|findstr /be "[0-9]*" >nul &&goto:server||goto:PC
::if /i "%s%" equ "Y" goto:server else goto:pc
:PC
ECHO ==本程序用于服務(wù)器時具有相當(dāng)?shù)奈kU性,請參照本程序源碼REM操作!==
REM 服務(wù)器操作時這部分操作請勿使用!否則本人概不負(fù)責(zé)!
TITLE 清理.bak備份文件-謹(jǐn)慎操作!
del /f /s /q %windir%*.bak
REM 用于服務(wù)器時請勿刪除日志!-謹(jǐn)慎操作!
TITLE 用于服務(wù)器時請勿刪除日志!-謹(jǐn)慎操作!
del /f /s /q %systemdrive%*.log
REM 勿使用rd /s /q %windir% emp & md %windir% emp命令,否則服務(wù)器服務(wù)(如DB)容易出現(xiàn)問題!
::del /f/s /q %windir% emp*.*
REM 若要清理幫助文件,將下面的::刪除即可
::rd /s /q "%windir%help"
goto:server
:server
ECHO ::1.清理局域網(wǎng)共享痕跡--注冊表::
TITLE ::1.清理局域網(wǎng)共享痕跡--注冊表::
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerWorkgroupCrawlerShares" /f >nul 2>nul
ECHO ::2.清理運(yùn)行或操作歷史記錄--注冊表::
TITLE ::2.清理運(yùn)行或操作歷史記錄--注冊表::
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocsFolder" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.txt" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.rar" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.mp3" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.jpg" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.ini" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.bmp" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.doc" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.eip" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.htm" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.ico" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.inf" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.gif" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.wav" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.xls" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs.rm" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRecentDocs" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32LastVisitedMRU" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRU*" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUmp3" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRU m" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUwav" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUat" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUexe" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUeip" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUico" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUhtm" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerComDlg32OpenSaveMRUjpg" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerRunMRU" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerStreamMRU" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerUserAssist{5E6AB780-7743-11CF-A12B-00AA004AE837}Count" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerUserAssist{75048700-EF1F-11D0-9888-006097DEACF9}Count" /va /f >nul 2>nul
reg "HKCUSoftwareWinRARArcHistory" /va /f >nul 2>nul
reg "HKCUSoftwareWinRARDialogEditHistoryArcName" /va /f >nul 2>nul
reg "HKCUSoftwareWinRARDialogEditHistoryExtrPath" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftMediaPlayerPlayerRecentFileList" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftMicrosoft Management ConsoleRecent File List" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftOffice11.0PowerPointRecent File List" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftOffice11.0ExcelRecent File" /va /f >nul 2>nul
reg "HKCUSoftwareMicrosoftOffice11.0WordData" /v "Settings" /f >nul 2>nul
reg "HKCUSoftwareVMware, Inc." /va /f >nul 2>nul
ECHO ::3.清理IE瀏覽歷史的下拉列表--注冊表::
TITLE ::3.清理IE瀏覽歷史的下拉列表--注冊表::
reg "HKCUSoftwareMicrosoftInternet ExplorerTypedUrls" /va /f >nul 2>nul
ECHO ::4.正在清理常見系統(tǒng)垃圾文件=::
TITLE ::4.正在清理常見系統(tǒng)垃圾文件::
del /f /q "%ALLUSERSPROFILE%DocumentsDrWatson*.*">nul 2>nul
del /f /s /q %systemdrive%*.tmp
del /f /s /q %systemdrive%*._mp
del /f /s /q %systemdrive%*.gid
del /f /s /q %systemdrive%*.chk
del /f /s /q %systemdrive%*.old
del /f /s /q %systemdrive% humbs.db
del /f /s /q %systemdrive% ecycled*.*
del /f /s /q %windir%system32dllcache*.*
del /f /s /q %windir%prefetch*.*
cls
ECHO ::5.為安全起見,以下清理操作只對當(dāng)前登錄帳戶有效::
TITLE ::5.為安全起見,以下清理操作只對當(dāng)前登錄帳戶有效::
del /f /s /q "%tmp%*.*"
ECHO ::6.清理文件緩存::
TITLE ::6.清理文件緩存::
SFC /purgecache
cls
ECHO ::7.清理系統(tǒng)升級補(bǔ)丁目錄::
TITLE ::7.清理系統(tǒng)升級補(bǔ)丁目錄::
dir %SystemRoot%$*$ /ad/b >%SystemRoot%DirTmp.txt
for /f %%a in (%SystemRoot%DirTmp.txt) do rd /s /q "%SystemRoot%\%%a"
del /f /q %SystemRoot%DirTmp.txt
cls
ECHO ::8.清理磁盤錯誤檢測文件::
TITLE ::8.清理磁盤錯誤檢測文件::
dir %SystemDrive%found.??? /ad/b >%systemDrive%DirTmp.txt
for /f %%a in (%systemDrive%DirTmp.txt) do rd /s /q "%systemDrive%\%%a"
del /f /q %systemDrive%DirTmp.txt
cls
ECHO ::9.正在清理所有(域)帳戶下的所有臨時文件,請稍候::
TITLE ::9.正在清理所有(域)帳戶下的所有臨時文件,請稍候::
dir "%SystemDrive%Documents and Settings" /ad/b >%SystemDrive%DirTmp.txt
for /f %%a in (%SystemDrive%DirTmp.txt) do del /f /s /q "%SystemDrive%Documents and Settings\%%aCookies*.*"&del /f /s /q "%SystemDrive%Documents and Settings\%%aRecent*.*"&rd /s /q "%SystemDrive%Documents and Settings\%%aLocal SettingsHistory"&del /f /s /q "%SystemDrive%Documents and Settings\%%aLocal SettingsTemp*.*"&del /f /s /q "%SystemDrive%Documents and Settings\%%aLocal SettingsTemporary Internet Files*.*"
del /f /q %SystemDrive%DirTmp.txt
cls
ECHO ::10.刪除系統(tǒng)驅(qū)動備份文件,釋放空間::
TITLE ::10.刪除系統(tǒng)驅(qū)動備份文件,釋放空間::
rd /s /q %SystemDrive%swsetup
ECHO ::11.正在進(jìn)行系統(tǒng)優(yōu)化::
TITLE ::11.正在進(jìn)行系統(tǒng)優(yōu)化::
echo 禁用RealPlayer更新和開機(jī)項(xiàng)
::清理右鍵ATI顯卡選項(xiàng)--ATI CATALYST(R) Control
::if exist "%windir%system32atiacmxx.dll" (regsvr32 /u "%windir%system32atiacmxx.dll")
::清理右鍵Intel顯卡選項(xiàng)
::if exist "%windir%system32igfxpph.dll" regsvr32 /u "%windir%system32igfxpph.dll"
::清理右鍵NVIDIA顯卡選項(xiàng)
::if exist "%windir%system32 vcpl.dll" regsvr32 /u "%windir%system32 vcpl.dll"
::清理realplayer更新
if exist "%ProgramFiles%Common~1RealUpdate_OB ealsched.exe" ren "%ProgramFiles%Common~1RealUpdate_OB ealsched.exe" realsched.ex_
if exist "%ProgramFiles%Common~1RealUpdate_OB ealsched.exe" del /f /s /q "%ProgramFiles%Common~1RealUpdate_OB ealsched.exe"
reg "HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun" /v TkBellExe /f
cls
ECHO ::12.正在進(jìn)行最后一步——磁盤清理,完成后自動退出::
ECHO 當(dāng)耗時越長時,說明你系統(tǒng)垃圾越多,請耐心等待程序執(zhí)行完畢。。。
TITLE ::12.正在進(jìn)行最后一步——磁盤清理,完成后自動退出::
cleanmgr /sagerun:99
exit
現(xiàn)在我們要在我們的電腦里設(shè)置一下!把我們文件的擴(kuò)展名顯示出來!這樣我們就能修改文件的擴(kuò)展名了!我們隨便用一個文件夾,打開“組織”菜單,然后“文件夾和搜索選項(xiàng)”!在選項(xiàng)卡里選擇查看,然后把“隱藏已知文件類型的擴(kuò)展名”前面的鉤去掉!
把這個文本文件另存為BAT文件!我們可以直接保存好這個TXT文件,之后把TXT的`擴(kuò)展名改為BAT的;也可以另存,這時候在文件名那里把擴(kuò)展名改為BAT的也是可以的!
如果安裝了360的一些軟件的,我們就先要把360的軟件退出!如果不退出就會有一些提示,我們就要允許它就行了!不要阻止,阻止了程序會運(yùn)行不下去!
現(xiàn)在我們就運(yùn)行一下我們之前做好的軟件吧!我們要選擇一下,我們的就選擇不是服務(wù)器2吧!現(xiàn)在我們就能看程序在一個一個地清除系統(tǒng)中的垃圾文件了!
現(xiàn)在我們就用一些常用的軟件來檢測一下我們的電腦還有多少垃圾吧!嘻嘻…兩個軟件的檢測到的垃圾都不多!是不是很有用呢?趕快自己動手做一個吧!
END
注意事項(xiàng)
垃圾清除會把系統(tǒng)日志、補(bǔ)丁也清掉!
【電腦運(yùn)行緩慢怎么解決】相關(guān)文章:
電腦時間緩慢怎么解決11-29
電腦運(yùn)行慢怎么解決11-21
電腦cpu運(yùn)行慢怎么解決11-29
電腦運(yùn)行很卡的解決辦法11-24
電腦聲音小怎么解決11-22
宏基電腦白屏怎么解決12-30
電腦卡慢怎么解決11-29
電腦慢卡怎么解決11-29
電腦上網(wǎng)慢怎么解決11-29