电脑问题---文件夹删除问题

来源:百度知道 编辑:UC知道 时间:2024/05/21 15:52:55
---------------我从网上查到一个防止autorun.inf病毒的方法。其文摘如下:
autorun病毒的危害相信中过招的人都有体会。其最大的特点就在于很难清除干净,现在可以提前对系统分区做一次免疫工作,而那些已经中了autorun病毒的用户也能顺便将病毒清除。

有人曾经使用系统组策略的方法,不过对于初学者来说有点复杂。现在复制以下代码到文本文件中,保存为bat文件即可。

@echo off
cls
echo 按 S 键删除Autorun.inf并进行免疫
echo.
echo 按 D 键删除免疫程序
echo.
echo 按其他任意键退出
echo.
echo.
SET Choice=
SET /P Choice= 请选择要进行的操作:
IF /I '%Choice:~0,1%'=='s' GOTO setup
IF /I '%Choice:~0,1%'=='d' GOTO Delset
IF /I '%Choice:~0,1%'=='q' GOTO Exit
exit
:Setup
taskkill /im explorer.exe /f
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: (
rd %%a:\autorun.inf /s /q
del %%a:\autorun.inf /f /q
mkdir %%a:\autorun.inf
mkdir %%a:\autorun.inf"病毒免疫勿删除../"
attrib +h +

@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: (

attrib -h -r -s %%a:\autorun.inf
rd %%a:\autorun.inf"病毒免疫勿删除../"
rd %%a:\autorun.inf /s /q

)
)
保存bat文件
运行就可以了

我遇到过这个问题咯
已经解决 没有像他们那么厉害 可以写bat文件
我的做法是 先杀毒 把毒杀了 然后 再显示隐藏文件(就是可以看到每个盘里的autorun.inf)把他们都删除,然后再重新启动 就可以解决咯

rd %%a:\autorun.inf /s /q
del %%a:\autorun.inf /f /q
mkdir %%a:\autorun.inf
mkdir %%a:\autorun.inf"病毒免疫勿删除../"
attrib +h +r +s %%a:\autorun.inf
创建文件夹后,属性为只读,并且被系统调用,以防止auto介入,所以,删除不了
或在安全模式下,或在DOS下,可以达到目的
提醒:治标不治本的方法,慎用!