@echo off
cls
echo 请稍等...
for %%i in (c d e f g h i j k l m n o p q r s t u v w y z) do if exist %%i:\autorun.inf delen %%i:\autorun.inf /z /yq>nul
cls
echo 请稍等...
for %%j in (c d e f g h i j k l m n o p q r s t u v w y z) do if exist %%j:\pagefile.pif delen %%j:\pagefile.pif /z /yq>nul
cls
根据楼主的提示我也写了个类似的:
@echo off
cls
:m1
echo 正在检测系统当前是否加载了NTFS驱动,如果未加载将会自动加载...
if "%fspd2c2%"=="jzcg" echo 检测到系统当前已经加载了NTFS驱动
if "%fspd2c2%"=="jzcg" goto m3
:m2
echo 检测到系统当前没有加载NTFS驱动
echo 正在加载ntfs驱动以便对ntfs格式的分区进行读写操作,本任务完成后会自动卸载
call jzifs.bat
echo NTFS驱动加载成功
:m3
echo 正在查找autorun.inf文件,请稍等...
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 if exist %%i:\autorun.inf echo 发现%%i:\autorun.inf并清除.
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 if exist %%i:\autorun.inf goto clsauto
echo 没有发现autorun.inf.
:clsauto
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 if exist %%i:\autorun.inf delen %%i:\autorun.inf /z /yq>nul
echo 正在卸载ntfs驱动...
call xzifs.bat
echo 成功卸载nffs驱动
echo.
echo 清除任务已经完成,请按任意键继续...
pause >nul
call M.BAT
还没完工,BUG太多,先上图预览。
[ 本帖最后由 2gg 于 2010-9-2 16:23 编辑 ]作者: jszforms 时间: 2010-8-31 17:43
本人制作一个批处理,U盘中毒后很好用
内容如下:
@echo off
if exist autorun.inf attrib -a -r -h -s autorun.inf & del autorun.inf
for /f "delims=" %%i in ('dir /a /b') do attrib "%%i" -s -h -r
for /f "delims=" %%i in ('dir /ad /b') do if exist "%%i.exe" attrib "%%i.exe" -s -h -r && del "%%i.exe"
for /f "delims=" %%i in ('dir /ad /b') do if exist "%%i.lnk" attrib "%%i.lnk" -s -h -r && del "%%i.lnk"
for /f "delims=" %%i in ('dir *.vbs /a /b') do if exist "%%i" attrib "%%i" -s -h -r && del "%%i"
if exist "Recycled" attrib +s +h "Recycled"
if exist "System Volume Information" attrib +s +h -a "System Volume Information"
if exist "Recycled" attrib "Recycled"
if exist "System Volume Information" attrib "System Volume Information"
if exist "Recycled" echo 操作完成,Recycled和ystem Volume Information两个系统文件夹的属性都是SH。
if not exist "Recycled" echo 操作完成。
pause