小编教你Win7如何有效预防autorun病毒

Win7如何有效预防autorun病毒autorun病毒是一种u盘病毒,目前想对付autorun病毒是相当棘手的,因为autorun病毒自有一套对付杀毒软件的方法,所以我们想彻底清除autorun病毒是很难的。因此,我们一定要在感染之前做好预防措施,下面给大家介绍Win7免疫autorun病毒的方法。

具体方法如下:

1、首先新建一个文本文档,右键点击空白处打开菜单,选择“新建--文本文档”;

Win7如何有效预防autorun病毒?

2、打开刚刚新建的txt文件,复制下方代码进去;

01@echo off02cls03echo按 S 键删除各个磁盘中的Autorun.inf并进行免疫(注意,插上U盘也将会进04行免疫)05echo按 D 键删除免疫程序06echo按其他任意键退出07echo.08set choice=09set /p choice=请选择要进行的操作:10if /i "%choice%"=="s" goto setup11if /i "%choice%"=="d" goto Delset12if /i "%choice%"=="" goto Exit13goto exit14:Setup15taskkill /im explorer.exe /f16for %%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 @ (17if exist %%a: (18rd %%a:autorun.inf /s /q19del %%a:autorun.inf /f /q20mkdir %%a:autorun.inf21mkdir %%a:autorun.inf"病毒免疫勿删除../"22attrib +h +r +s %%a:autorun.inf23echo "%%a:免疫成功"24)25)26start explorer.exe27echo.28echo 按任意键退出....29pause>nul30exit31:delset32for %%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 @ (33if exist %%a: (34rd %%a:autorun.inf /s /q35)36)37echo.38echo操作完毕,按任意键退出....39pause>nul40exit复制代码@echo offclsecho按 S 键删除各个磁盘中的Autorun.inf并进行免疫(注意,插上U盘也将会进行免疫)echo按 D 键删除免疫程序echo按其他任意键退出echo.set choice=set /p choice=请选择要进行的操作:if /i "%choice%"=="s" goto setupif /i "%choice%"=="d" goto Delsetif /i "%choice%"=="" goto Exitgoto exit:Setuptaskkill /im explorer.exe /ffor %%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 /qdel %%a:autorun.inf /f /qmkdir %%a:autorun.infmkdir %%a:autorun.inf"病毒免疫勿删除../"attrib +h +r +s %%a:autorun.infecho "%%a:免疫成功"))start explorer.exeecho.echo 按任意键退出....pause>nulexit:delsetfor %%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))echo.echo操作完毕,按任意键退出....pause>nulexit

Win7如何有效预防autorun病毒?

3、复制完成后,点击左上角的“文件--另存为”,之后将“保存类型”修改为“所有文件”,文件名修改为“文件名称.bat”的形式,文件名称可以任意取,设置完成后点击“保存”;

Win7如何有效预防autorun病毒?

Win7如何有效预防autorun病毒?

4、插入u盘,双击刚刚生成的bat文件,根据提示进行操作即可。

Win7如何有效预防autorun病毒?

上述便是Win7系统预防u盘中autorun病毒的方法,经常需要使用u盘的伙伴,最好按照上文设置一下,防患于未然,方能幸免于难。

本文来自网络投稿,来自作者春天。不代表酷牛教程立场,如若转载,请注明出处:https://www.xukn.com/365493.html

(0)
春天春天
上一篇 2023-06-18 18:09
下一篇 2023-06-18 18:09

相关推荐

发表回复

登录后才能评论