日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > windows >内容正文

windows

bat删除计算机用户,自动清除电脑垃圾及删除windows默认共享盘符的批处理bat

發(fā)布時(shí)間:2025/3/15 windows 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 bat删除计算机用户,自动清除电脑垃圾及删除windows默认共享盘符的批处理bat 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

by:zuifeng258

Windows在默認(rèn)情況下幾個(gè)盤多是共享的,它們是隱藏的危險(xiǎn)。

在dos下用命令“net share”可以查看。。。

不能截圖,就只能打打字了

復(fù)制代碼 代碼如下:

@echo off

echo 正在自動(dòng)刪除admin$管理共享和ipc$管道共享,

net share admin$ /del

net share IPC$ /del

net share C$ /del

net share D$ /del

net share E$ /del

net share F$ /del

@echo off并不是DOS程序中的,

而是DOS批處理中的。

當(dāng)年的DOS,所有操作都用鍵盤命令來(lái)完成,

當(dāng)你每次都要輸入相同的命令時(shí),

可以把這么多命令存為一個(gè)批處理。

上面那段是默認(rèn)admin$管理共享和ipc$管道共享的命令

如果那沒有這么多盤符,可以照上面的“net shere *$” /del ' *是你的盤符號(hào)。進(jìn)行增減

復(fù)制代碼 代碼如下:

@echo off

echo 這是正在檢查cookies、歷史紀(jì)錄等目錄位置(當(dāng)前用戶)……

reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txt

reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cookies>>%temp%\cleantmp.txt

reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txt

reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v NetHood>>%temp%\cleantmp.txt

reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Recent>>%temp%\cleantmp.txt

echo 這里是 清理當(dāng)前用戶的Cookies,IE緩存,歷史紀(jì)錄等……

for /f "tokens=3*" %%i in (%temp%\cleantmp.txt) do (

for /d %%i in ("%%i %%b\*.*") do rd /q /s "%%i">Nul 2>Nul

del /a /f /s /q "%%i %%b\*.*">Nul 2>Nul

)

echo 這里清理系統(tǒng)臨時(shí)垃圾文件……

del /a /f /s /q "%userprofile%\Locals~1\Tempor~1\*.*" >Nul 2>Nul

del /a /f /s /q "%userprofile%\Locals~1\Temp\*.*" >Nul 2>Nul

del /a /f /s /q "%userprofile%\cookies\*.*" >Nul 2>Nul

del /a /f /s /q "%userprofile%\recent\*.*" >Nul 2>Nul

del /a /f /s /q "%Temp%\*.*" >Nul 2>Nul

del /a /f /s /q "%Tmp%\*.*" >Nul 2>Nul

del /a /f /s /q "%HomePath%\..\IconCache.db" >Nul 2>Nul

del /a /f /s /q "%SystemDrive%\driver?\*.pnf" >Nul 2>Nul

del /a /f /s /q "%SystemDrive%\driver?\InfCache.1" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\*._mp" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\*.bak" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\kb*.log" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\*.dmp" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\*.gid" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\*.old" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\*.query" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\*.tmp" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\inf\InfCache.1" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\driver?\*.pnf" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\driver?\InfCache.1" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\inf\*.pnf" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\minidump\*.*" >Nul 2>Nul

del /a /f /s /q "%SystemRoot%\Prefetch\*.*" >Nul 2>Nul

for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do del /a /f /q %%i:\autorun.inf %%i:\*.exe & rd /q /s %%i:\recycler %%i:\recycled

rd /q /s "%ProgramFiles%\InstallShield Installation Information" >Nul 2>Nul

rd /q /s "%systemdrive%\Documents and Settings\All Users\Documents\My BoBoTurbo" >Nul 2>Nul

rd /q /s "%systemroot%\Connection Wizard" >Nul 2>Nul

rd /q /s "%systemroot%\Downloaded Installations" >Nul 2>Nul

rd /q /s "%SystemRoot%\Help" >Nul 2>Nul

rd /q /s "%systemroot%\ie7updates" & md "%systemroot%\ie7updates" >Nul 2>Nul

rd /q /s "%SystemRoot%\Offline Web Pages" >Nul 2>Nul

rd /q /s %SystemRoot%\system32\oobe

rd /q /s "%SystemRoot%\system32\ReinstallBackups" >Nul 2>Nul

rd /q /s "%SystemRoot%\SoftwareDistribution\Download" & md "%SystemRoot%\SoftwareDistribution\Download" >Nul 2>Nul

rd /q /s "%SystemRoot%\SoftwareDistribution\datastore" & md "%SystemRoot%\SoftwareDistribution\datastore" >Nul 2>Nul

rd /q /s "%SystemRoot%\SoftwareDistribution\EventCache" & md "%SystemRoot%\SoftwareDistribution\EventCache" >Nul 2>Nul

rd /q /s "%SystemRoot%\temp" & md "%SystemRoot%\temp" >Nul 2>Nul

echo 這里是清理無(wú)用的磁盤檢錯(cuò)文件……

del /a /f /q "%SystemDrive%\*.chk" >Nul 2>Nul

dir %SystemDrive%\found.??? /ad/b >c:\臨時(shí)垃圾.txt

for /f %%i in (c:\臨時(shí)垃圾.txt) do rd /q /s "%SystemDrive%\%%i" >Nul 2>Nul

echo 這里清理系統(tǒng)升級(jí)補(bǔ)丁留下來(lái)的反安裝目錄……

dir %SystemRoot%\$*$ /ad /b >c:\臨時(shí)垃圾.txt

for /f %%i in (c:\臨時(shí)垃圾.txt) do rd /q /s "%SystemRoot%\%%i" >Nul 2>Nul

echo 這里是清除常見的軟件垃圾項(xiàng)目……

Ren "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_ >Nul 2>Nul

Del "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" >Nul 2>Nul

rd /q /s "%ProgramFiles%\Tencent\QQGame\Download" >Nul 2>Nul

taskkill /f /im "TIMPlatform.exe" /t >Nul 2>Nul

del /a /f /s /q "%ProgramFiles%\Tencent\QQ\TIMPlatform.exe" >Nul 2>Nul

del /a /f /s /q c:\臨時(shí)垃圾.txt

regsvr32 /u /s zipfldr.dll & del /f /s /q %systemroot%\ststem32\zipfldr.dll

copy /y %systemroot%\system32\dllcache\ctfmon.exe d:\

copy /y %systemroot%\system32\dllcache\explorer.exe d:\

copy /y %systemroot%\system32\dllcache\userinit.exe d:\

sfc /purgecache

copy /y d:\ctfmon.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\ctfmon.exe

copy /y d:\explorer.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\explorer.exe

copy /y d:\userinit.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\userinit.exe

echo 已完成一鍵系統(tǒng)垃圾自動(dòng)清理及系統(tǒng)自動(dòng)減肥

exit

也不知道這代碼怎么講,呵呵,,

我就不講解代碼了。。

講講這么操作吧,建一個(gè)TxT的文本文件,把代碼輸入進(jìn)去,在把它的后綴名改成 .bat

的批處理文件,然后再它基礎(chǔ)上創(chuàng)建一個(gè)快捷方式,把這個(gè)快捷方式放到菜單欄那“開始”中啟動(dòng)項(xiàng)里面。

就OK 了。此后只要你開機(jī),它就自己運(yùn)行,運(yùn)行完后就自動(dòng)退出

如果你想手動(dòng),照上做,

想要處理的時(shí)候就直接雙擊你的批處理文件就行。

最后說(shuō)一下,批處理的功能很強(qiáng),批處理的命令不熟不要亂用,很危險(xiǎn),,,,,

js

總結(jié)

以上是生活随笔為你收集整理的bat删除计算机用户,自动清除电脑垃圾及删除windows默认共享盘符的批处理bat的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。