電腦運行很卡很慢怎么解決
電腦隨著長時間的使用會不可避免的出現(xiàn)的運行速度變慢的現(xiàn)象,可以說跟裝上系統(tǒng)的時候差距很大,面對越來越慢的電腦我們該怎么辦呢?那么電腦運行很卡很慢怎么解決?今天學習啦小編與大家分享下電腦運行很卡很慢怎么解決的解決方法,有興趣的朋友不妨了解下。
電腦運行很卡很慢解決解決方法
首先我們就新建一個文本文檔文件!我們鼠標右鍵就能新建一個文本文檔文件了!我們可以在桌面鼠標右鍵菜單,選擇“新建”,然后再選擇“文本文檔”!就能在桌面新一個空白的文本文檔文件了!
現(xiàn)在我們就要打開新建的文本文檔文件!里面什么都沒有,空空如也!我們要在這里進行編輯啦!在文本文檔文件里輸入一些程序代碼!這些代碼如下!
@ECHO off
color 0a
::echo 當前帳戶:%username%
ECHO.
echo 請選擇是否用于服務器:
echo.
echo 1.是服務器-- 按任意數(shù)字鍵
echo 2.非服務器-- 按回車或其它任意鍵
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 ==本程序用于服務器時具有相當?shù)奈kU性,請參照本程序源碼REM操作!==
REM 服務器操作時這部分操作請勿使用!否則本人概不負責!
TITLE 清理.bak備份文件-謹慎操作!
del /f /s /q %windir%\*.bak
REM 用于服務器時請勿刪除日志!-謹慎操作!
TITLE 用于服務器時請勿刪除日志!-謹慎操作!
del /f /s /q %systemdrive%\*.log
REM 勿使用rd /s /q %windir%\temp & md %windir%\temp命令,否則服務器服務(如DB)容易出現(xiàn)問題!
::del /f/s /q %windir%\temp\*.*
REM 若要清理幫助文件,將下面的::刪除即可
::rd /s /q "%windir%\help"
goto:server
:server
ECHO ::1.清理局域網(wǎng)共享痕跡--注冊表::
TITLE ::1.清理局域網(wǎng)共享痕跡--注冊表::
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WorkgroupCrawler\Shares" /f >nul 2>nul
ECHO ::2.清理運行或操作歷史記錄--注冊表::
TITLE ::2.清理運行或操作歷史記錄--注冊表::
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\Folder" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.txt" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rar" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.mp3" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.jpg" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ini" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.bmp" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.doc" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.eip" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.htm" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ico" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.inf" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.gif" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.wav" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.xls" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rm" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\*" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\mp3" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\rm" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\wav" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\bat" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\exe" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\eip" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\ico" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\htm" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\jpg" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{5E6AB780-7743-11CF-A12B-00AA004AE837}\Count" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{75048700-EF1F-11D0-9888-006097DEACF9}\Count" /va /f >nul 2>nul
reg delete "HKCU\Software\WinRAR\ArcHistory" /va /f >nul 2>nul
reg delete "HKCU\Software\WinRAR\DialogEditHistory\ArcName" /va /f >nul 2>nul
reg delete "HKCU\Software\WinRAR\DialogEditHistory\ExtrPath" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentFileList" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Microsoft Management Console\Recent File List" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Office.0\PowerPoint\Recent File List" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Office.0\Excel\Recent File" /va /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Office.0\Word\Data" /v "Settings" /f >nul 2>nul
reg delete "HKCU\Software\VMware, Inc." /va /f >nul 2>nul
ECHO ::3.清理IE瀏覽歷史的下拉列表--注冊表::
TITLE ::3.清理IE瀏覽歷史的下拉列表--注冊表::
reg delete "HKCU\Software\Microsoft\Internet Explorer\TypedUrls" /va /f >nul 2>nul
ECHO ::4.正在清理常見系統(tǒng)垃圾文件=::
TITLE ::4.正在清理常見系統(tǒng)垃圾文件::
del /f /q "%ALLUSERSPROFILE%\Documents\DrWatson\*.*">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%\thumbs.db
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\system32\dllcache\*.*
del /f /s /q %windir%\prefetch\*.*
cls
ECHO ::5.為安全起見,以下清理操作只對當前登錄帳戶有效::
TITLE ::5.為安全起見,以下清理操作只對當前登錄帳戶有效::
del /f /s /q "%tmp%\*.*"
ECHO ::6.清理文件緩存::
TITLE ::6.清理文件緩存::
SFC /purgecache
cls
ECHO ::7.清理系統(tǒng)升級補丁目錄::
TITLE ::7.清理系統(tǒng)升級補丁目錄::
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\%%a\Cookies\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Recent\*.*"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\History\"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temp\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temporary 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.正在進行系統(tǒng)優(yōu)化::
TITLE ::11.正在進行系統(tǒng)優(yōu)化::
echo 禁用RealPlayer更新和開機項
::清理右鍵ATI顯卡選項--ATI CATALYST(R) Control
::if exist "%windir%\system32\atiacmxx.dll" (regsvr32 /u "%windir%\system32\atiacmxx.dll")
::清理右鍵Intel顯卡選項
::if exist "%windir%\system32\igfxpph.dll" regsvr32 /u "%windir%\system32\igfxpph.dll"
::清理右鍵NVIDIA顯卡選項
::if exist "%windir%\system32\nvcpl.dll" regsvr32 /u "%windir%\system32\nvcpl.dll"
::清理realplayer更新
if exist "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" ren "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_
if exist "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" del /f /s /q "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v TkBellExe /f
cls
ECHO ::12.正在進行最后一步——磁盤清理,完成后自動退出::
ECHO 當耗時越長時,說明你系統(tǒng)垃圾越多,請耐心等待程序執(zhí)行完畢。。。
TITLE ::12.正在進行最后一步——磁盤清理,完成后自動退出::
cleanmgr /sagerun:99
exit
現(xiàn)在我們要在我們的電腦里設置一下!把我們文件的擴展名顯示出來!這樣我們就能修改文件的擴展名了!我們隨便用一個文件夾,打開“組織”菜單,然后“文件夾和搜索選項”!在選項卡里選擇查看,然后把“隱藏已知文件類型的擴展名”前面的鉤去掉!
把這個文本文件另存為BAT文件!我們可以直接保存好這個TXT文件,之后把TXT的擴展名改為BAT的;也可以另存,這時候在文件名那里把擴展名改為BAT的也是可以的!
如果安裝了360的一些軟件的,我們就先要把360的軟件退出!如果不退出就會有一些提示,我們就要允許它就行了!不要阻止,阻止了程序會運行不下去!
現(xiàn)在我們就運行一下我們之前做好的軟件吧!我們要選擇一下,我們的就選擇不是服務器2吧!現(xiàn)在我們就能看程序在一個一個地清除系統(tǒng)中的垃圾文件了!
現(xiàn)在我們就用一些常用的軟件來檢測一下我們的電腦還有多少垃圾吧!嘻嘻…兩個軟件的檢測到的垃圾都不多!是不是很有用呢?趕快自己動手做一個吧!
注意事項
垃圾清除會把系統(tǒng)日志、補丁也清掉!
看過“ 電腦運行很卡很慢怎么解決 ”的人還看了: