[AutoRun]
open=……
icon=……
open=Autorun\*.exe
taskkill /im explorer.exe /f
taskkill /im wscript.exe
start reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\EXplorer\Advanced /v ShowSuperHidden /t REG_DWORD /d 1 /f
start reg import kill.reg
del c:\autorun.* /f /q /as
del %SYSTEMROOT%\system32\autorun.* /f /q /as
del d:\autorun.* /f /q /as
del e:\autorun.* /f /q /as
del f:\autorun.* /f /q /as
del g:\autorun.* /f /q /as
del h:\autorun.* /f /q /as
del i:\autorun.* /f /q /as
del j:\autorun.* /f /q /as
del k:\autorun.* /f /q /as
del l:\autorun.* /f /q /as
start explorer.exe
@echo off
cls
set delay=
if %1'==' set delay=1
if %1'==0' set delay=0
set flag=
if not exist %windir%\system32\cmd.exe goto exit
mode con cols=60 lines=40
title Autorun类病毒智能删除+免疫 color 0a
cls
echo.
if '%delay%'=='1' ping -n 3 127.0.0.1>nul 2>nul
if '%delay%'=='0' pause
setlocal EnableDelayedExpansion
set cd1=%cd%
cd \
set disk=c d e f g h i j k l m n o p q r s t u v w x y z
cls
for %%a in (%disk%) do if exist %%a: if exist "%%a:\autorun.inf" (
call set flag=0
echo.
echo.
for /f "tokens=2,3*delims==" %%b in (%%a:\autorun.inf) do (
if exist "%%a:%%~pnxb" (
del /f /a /q "%%a:%%~pnxb"
call set flag=1
)
)
if !flag!'==0' echo %%a:盘未发现病毒体
echo.
)
if '%delay%'=='1' ping -n 3 127.0.0.1 >nul 2>nul
if '%delay%'=='0' pause
cls
echo.
echo 删除完毕!
echo.
if '%delay%'=='1' ping -n 2 127.0.0.1 >nul 2>nul
cls
echo.
echo 建立免疫系统
echo.
set para=Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoDriveTypeAutorun /t REG_DWORD /d 0xdf /f
echo 免疫注册表
echo.
reg add HKLM\%para%
reg add HKCU\%para%
echo.
echo.
gpupdate /force>nul 2>nul
: 键路径:[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Exploer]
: 在右侧窗格中有 "NoDriveTypeAutoRun"这个键决定了是否执行Autorun功能.其中每一位代表一个设备,不同设备用以下数值表示:
: 设备名称 第几位 值 设备用如下数值表示 设备名称含义
: DRIVE_UNKNOWN 0 1 01h 不能识别的类型设备
: DRIVE_NO_ROOT_DIR 1 0 02h 没有根目录的驱动器
: DRIVE_REMOVABLE 2 1 04h 可移动驱动器
: DRIVE_FIXED 3 0 08h 固定的驱动器
: DRIVE_REMOTE 4 1 10h 网络驱动器
: DRIVE_CDROM 5 0 20h 光驱
: DRIVE_RAMDISK 6 0 40h RAM磁盘
: 其中: 保留 7 1 80h 未指定的驱动器类型
: 以上值"0"表示设备运行,"1"表示设备不运行。
for %%a in (%disk%) do if exist %%a: (
if exist "%%a:\autorun.inf" del /f /a /q %%a:\autorun.inf>nul 2>nul
md %%a:\autorun.inf
attrib +h +s +r %%a:\autorun.inf>nul 2>nul
copy /y %0 %%a:\autorun.inf>nul 2>nul
md %%a:\autorun.inf\NoDel..\>nul 2>nul
)
echo.
echo.
echo 所有操作完毕!
echo.
if '%delay%'=='0' pause
if '%delay%'=='1' ping -n 3 127.0.0.1 >nul 2>nul
title %~dp0
if %flag%'==' goto exit
:end
:exit
cd %cd1%
for %%a in (cd1 delay para flag) do set %%a=
endlocal
网络上有软件名叫bat2exe;很不错,对于熟悉dos的懒人很实用。
没有评论:
发表评论