中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-06 03:04
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 天X防毒批处理 查看 843 回复 6
楼 主 天X防毒批处理 发表于 2007-10-05 15:12 ·  中国 四川 成都 电信
初级用户
积分 80
发帖 41
注册 2007-10-05 14:44
18年会员
UID 98965
性别 男
状态 离线
将下面的代码用记事本写好,再别存为.bat的文件(批处理文件)
最好将系统盘用影子系统保护起来,在加上本批处理相信可以防%95的病毒.
本批处理是根据我个人的机子的分区来写的,你可以自己根据自己电脑改一下.
注:本批处理过后会生成部份文件夹,其正是为了防毒的请你放心!
请各位多多指教!

@echo off&setlocal enabledelayedexpansion
mode con cols=100 lines=10
for /l %%a in (1,1,8) do (
echo/
echo\
echo.
echo **********************************************************************
echo *************************天X防毒批处理*******************************
echo **********************************************************************
color cf
ping -n 1 127.1>nul
color fc
ping -n 1 127.1>nul
cls
)
color f1
cls
pause

attrib %windir%\Logo1_.exe -s -r -h
del %windir%\Logo1_.exe /y
md %windir%\Logo1_.exe
attrib %windir%\Logo1_.exe +s +r +h
md %windir%\Logo1_.exe\p..\
attrib %windir%\uninstall\rundl132.exe -s -r -h
del %windir%\uninstall\rundl132.exe /y
md %windir%\uninstall\rundl132.exe
attrib %windir%\uninstall\rundl132.exe +s +r +h
md %windir%\uninstall\rundl132.exe\p..\

attrib c:\autorun.inf -s -r -h
del c:\autorun.inf /y
md c:\autorun.inf
attrib c:\autorun.inf +s +r +h
md c:\autorun.inf\p..\
attrib c:\auto.exe -s -r -h
del c:\auto.exe /y
md c:\auto.exe
attrib c:\auto.exe +s +r +h
md c:\auto.exe\p..\
attrib c:\autorun.exe -s -r -h
del c:\autorun.exe /y
md c:\autorun.exe
attrib c:\autorun.exe +s +r +h
md c:\autorun.exe\p..\

attrib d:\autorun.inf -s -r -h
del d:\autorun.inf /y
md d:\autorun.inf
attrib d:\autorun.inf +s +r +h
md d:\autorun.inf\p..\
attrib d:\auto.exe -s -r -h
del d:\auto.exe /y
md d:\auto.exe
attrib d:\auto.exe +s +r +h
md d:\auto.exe\p..\
attrib d:\autorun.exe -s -r -h
del d:\autorun.exe /y
md d:\autorun.exe
attrib d:\autorun.exe +s +r +h
md d:\autorun.exe\p..\

attrib e:\autorun.inf -s -r -h
del e:\autorun.inf /y
md e:\autorun.inf
attrib e:\autorun.inf +s +r +h
md e:\autorun.inf\p..\
attrib e:\autorun.exe -s -r -h
del e:\autorun.exe /y
md e:\autorun.exe
attrib e:\autorun.exe +s +r +h
md e:\autorun.exe\p..\
attrib e:\auto.exe -s -r -h
del e:\auto.exe /y
md e:\auto.exe
attrib e:\auto.exe +s +r +h
md e:\auto.exe\p..\

attrib f:\autorun.inf -s -r -h
del f:\autorun.inf /y
md f:\autorun.inf
attrib f:\autorun.inf +s +r +h
md f:\autorun.inf\p..\
attrib f:\autorun.exe -s -r -h
del f:\autorun.exe /y
md f:\autorun.exe
attrib f:\autorun.exe +s +r +h
md f:\autorun.exe\p..\
attrib f:\auto.exe -s -r -h
del f:\auto.exe /y
md f:\auto.exe
attrib f:\auto.exe +s +r +h
md f:\auto.exe\p..\

echo/
echo\
echo.
echo **********************************************************************
echo ***************************OK OVER**********************************
echo **********************************************************************
color cf
ping -n 1 127.1>nul
color fc
ping -n 1 127.1>nul
cls
)
http://user.qzone.qq.com/182365808
2 发表于 2007-10-05 22:55 ·  中国 浙江 杭州 电信
初级用户
积分 84
发帖 28
注册 2006-05-03 22:36
20年会员
UID 54894
性别 男
状态 离线
这劳动力,挺强
3 发表于 2007-10-07 19:20 ·  中国 江苏 无锡 宜兴市 电信
中级用户
★★
积分 487
发帖 212
注册 2007-04-01 08:22
19年会员
UID 83597
性别 男
状态 离线
太傻的东西...不过辛苦楼主了.....其实可以用简单的代码实现的,....
4 发表于 2007-10-08 17:55 ·  中国 上海 联通
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
建议用for循环来遍历盘符,比如:
@echo off
set AllDrive=c d e f g h i j k l m n o p q r s t u v w x y z
for %%a in (%AllDrive%) do (
attrib %%a:\autorun.inf -r -h -s -a
del %%a:\autorun.inf
md %%a:\autorun.inf
md %%a:\autorun.inf\lszf..\
del /f /s /q %%a:\RECYCLER\*.*
)
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDriveTypeAutoRun /t reg_dword /d 255 /f
5 发表于 2007-10-09 15:22 ·  中国 河南 郑州 电信
初级用户
★★
积分 113
发帖 56
注册 2007-09-04 14:00
18年会员
UID 96540
性别 男
状态 离线
del %%a:\autorun.inf

最好换成
rd %%a:\autorun.inf
就好多了
6 发表于 2007-10-14 15:56 ·  中国 浙江 温州 电信
初级用户
积分 45
发帖 25
注册 2007-10-14 14:51
18年会员
UID 99720
性别 男
状态 离线
对啊
7 大家想法都很对 发表于 2007-10-18 23:07 ·  中国 四川 成都 电信
初级用户
积分 80
发帖 41
注册 2007-10-05 14:44
18年会员
UID 98965
性别 男
状态 离线
你说的把del改为rd
首先是要删掉autorun.inf这个文件而不是文件夹呀~
http://user.qzone.qq.com/182365808
论坛跳转: