@echo off
echo 此程序用于删除右键自动播放的svchost.exe病毒
echo 请稍等.....正在删除病毒文件
::首先结束病毒进程
:taskkill
tasklist >tasklist.txt
findstr /i "temp1.exe temp2.exe" tasklist.txt &&taskkill /f /im temp1.exe /im temp2.exe >nul 2>nul
del tasklist.txt
::删除病毒启动注册表和盘符自动播放
:delreg
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v "load" /f >nul 2>nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v "load" /t REG_SZ /d "" /f >nul 2>nul
reg export "hkcu\software\microsoft\windows\currentversion\explorer\mountpoints2" delreg.reg >nul 2>nul
find /i "autorun" delreg.reg >temp.txt
for /f "skip=2 tokens=8 delims=\" %%a in (temp.txt) do reg delete HKCU\software\microsoft\windows\currentversion\explorer\mountpoints2\%%a\AUTORUN /f
del delreg.reg
del temp.txt
::删除病毒文件
:del
for %%l in (%systemroot% %systemroot%\system32) do (
for %%m in (autorun.inf host.exe copy.exe temp1.exe temp2.exe) do (
attrib %%l\%%m -r -s >nul 2>nul
del %%l\%%m /f /s /a :h >nul 2>nul
)
)
for %%i 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 (
%%i: >nul 2>nul||if errorlevel=1 goto ok
for %%j in (autorun.inf host.exe copy.exe folder.exe) do (
attrib %%i:\%%j -r -s >nul 2>nul
del %%i:\%%j /f /s /a :h >nul 2>nul
)
)
:ok
@echo 删除完成...按任意键退出
pause >nul
goto :eof |
|