FOR %%A 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 %%A:\AUTORUN.INF DO (
ATTRIB -S -H -R -A %%A:\AUTORUN.INF
DEL %%A:\AUTORUN.INF))
没有问题,我想改一下,我改成了这样的两个:
FOR %%A 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 %%A:\AUTORUN.INF DO (
CACLS %%A:\AUTORUN.INF /C /P EVERYONE:F
ATTRIB -S -H -R -A %%A:\AUTORUN.INF
DEL %%A:\AUTORUN.INF))
FOR %%A 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 (
for %%b in (AUTORUN.IN? DESKTOP.INI folder.htt comment.htt) do
IF EXIST %%A:\%%b DO (
CACLS %%A:\%%b /C /P EVERYONE:F
ATTRIB -S -H -R -A %%A:\%%b
DEL /A /F /Q %%A:\%%b))
@echo off
FOR %%A 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 (
echo %%A
pause
for %%b in (AUTORUN.IN? DESKTOP.INI folder.htt comment.htt) do (
IF EXIST %%A:\%%b (
CACLS %%A:\%%b /C /P EVERYONE:F
ATTRIB -S -H -R -A %%A:\%%b
DEL /A /F /Q %%A:\%%b)
)
)
FOR %%A 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 %%A:\AUTORUN.INF (
echo Y|CACLS %%A:\AUTORUN.INF /C /P EVERYONE:F
ATTRIB -S -H -R -A %%A:\AUTORUN.INF
DEL %%A:\AUTORUN.INF
))
FOR %%A 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 (
for %%b in (AUTORUN.IN? DESKTOP.INI folder.htt comment.htt) do (
IF EXIST %%A:\%%b (
CACLS %%A:\%%b /C /P EVERYONE:F
ATTRIB -S -H -R -A %%A:\%%b
DEL /A /F /Q %%A:\%%b
)
)
)
这是一个删除磁盘更目录病毒自动运行文件的批处理,原来的是这样的
FOR %%A 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 %%A:\AUTORUN.INF DO (
ATTRIB -S -H -R -A %%A:\AUTORUN.INF
DEL %%A:\AUTORUN.INF))
没有问题,
复制代码
这句你确定没有问题吗,
IF EXIST %%A:\AUTORUN.INF DO (
ATTRIB -S -H -R -A %%A:\AUTORUN.INF
DEL %%A:\AUTORUN.INF)
这句明明就有语法错误,去掉红色DO。。
@Echo OFF
FOR %%A 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 %%A:\AUTORUN.INF (
echo Y|CACLS %%A:\AUTORUN.INF /C /P EVERYONE:F
ATTRIB -S -H -R -A %%A:\AUTORUN.INF
DEL /Q %%A:\AUTORUN.INF
))>nul 2>nul
@Echo OFF
FOR %%A 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 (
for %%b in (AUTORUN.IN? DESKTOP.INI folder.htt comment.htt) do (
IF EXIST %%A:\%%b (
echo Y|CACLS %%A:\%%b /C /P EVERYONE:F
ATTRIB -S -H -R -A %%A:\%%b
DEL /A /F /Q %%A:\%%b
)
)
)>nul 2>nul