批处理应用-Mcafee手动杀毒脚本
程序员文章站
2022-06-16 15:46:50
此脚本使用mcafee的supperdat,进行计算机上病毒的查杀。使用flashget检查supperdat更新,参考:http://blog.csdn.net/scz1...
此脚本使用mcafee的supperdat,进行计算机上病毒的查杀。使用flashget检查supperdat更新,参考:http://blog.csdn.net/scz123/archive/2006/11/02/1362573.aspx
20061215: 修改scan.exe运行参数,增加 /program (扫描恶意软件)、/norename (不更改文件名)。
mcafee命令行参考手册:http://scz123.googlepages.com/mcafee5100wpg.pdf
1、使用本地的mcafee superdat来运行的脚本
2、使用局域网上共享的mcafee superdat来运行的脚本
--------------------------------------------------------------------------------
1、使用本地的mcafee superdat来运行的脚本
--------------------------------------------------------------------------------
@echo off
echo mcafee手动杀毒脚本
echo created by scz 20061101
echo =================================================
echo 建议在管理员环境下运行此脚本,以便能成功杀除病毒
echo =================================================
rem 此脚本运行需要mcafee的supperdat,下载地址:http://www.mcafee.com/apps/downloads/security_updates/superdat.asp?region=cn&segment=enterprise
rem supperdat下载后,请重命名为mcafee*.exe(*为任意字符)
if not exist mcafee*.exe (echo 病毒码不存在,无法执行下步操作,请按任意键退出... &goto error)
echo 正在释放病毒码...
for /f "skip=1" %%i in ('dir mcafee*.exe /o-d /b 2^>nul') do (del %%i)
for /f %%i in ('dir mcafee*.exe /b /o-d') do (%%i /e c:\mcafee & goto start)
:start
echo 启动扫描...
echo @echo off >c:\mcafee\杀毒.bat
echo echo. >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo echo mcafee手动杀毒脚本,扫描结束后会自动打开报表 >>c:\mcafee\杀毒.bat
echo echo created by scz 20061031 >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo set filename=%%date:-=%%.%%time::=%%.html >>c:\mcafee\杀毒.bat
echo cd /d c:\mcafee >>c:\mcafee\杀毒.bat
echo rem 保留最近10个报表 >>c:\mcafee\杀毒.bat
echo for /f "skip=10" %%%%i in ('dir *.html /o-d /b 2^^^>nul') do (del %%%%i) >>c:\mcafee\杀毒.bat
echo scan /adl /analyze /program /clean /norename /timeout 15 /winmem /html "%%filename%%" >>c:\mcafee\杀毒.bat
echo echo 病毒扫描完毕,请按任意键打开报表... >>c:\mcafee\杀毒.bat
echo if exist "%%filename%%" start "" "%%filename%%" >>c:\mcafee\杀毒.bat
cd /d c:\mcafee
start "mcafee virusscan" cmd /c 杀毒.bat
goto end
:error
pause >nul
:end
--------------------------------------------------------------------------------
2、使用局域网上共享的mcafee superdat来运行的脚本
--------------------------------------------------------------------------------
@echo off
echo mcafee手动杀毒脚本
echo created by scz 20061101
echo =================================================
echo 建议在管理员环境下运行此脚本,以便能成功杀除病毒
echo =================================================
rem 此脚本运行需要mcafee的supperdat,下载地址:http://www.mcafee.com/apps/downloads/security_updates/superdat.asp?region=cn&segment=enterprise
rem supperdat下载后,请重命名为mcafee*.exe(*为任意字符)
echo 正在连接远程计算机(scz)...
net use \\10.1.103.10 /user:scz\sczscz sczscz >nul 2>&1
net use x: /del /y >nul 2>&1
net use x: \\10.1.103.10\update >nul 2>&1 || (echo 网络异常,无法执行下步操作,请按任意键退出... &goto error)
cd /d x:\
if not exist mcafee*.exe (echo 病毒码不存在,无法执行下步操作,请按任意键退出... &goto error)
echo 正在释放病毒码...
for /f %%i in ('dir mcafee*.exe /b /o-d 2^>nul') do (%%i /e c:\mcafee & goto start)
:start
net use x: /del /y >nul 2>&1
net use \\10.1.103.10 /del /y >nul 2>&1
echo 启动扫描...
echo @echo off >c:\mcafee\杀毒.bat
echo echo. >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo echo mcafee手动杀毒脚本,扫描结束后会自动打开报表 >>c:\mcafee\杀毒.bat
echo echo created by scz 20061031 >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo set filename=%%date:-=%%.%%time::=%%.html >>c:\mcafee\杀毒.bat
echo cd /d c:\mcafee >>c:\mcafee\杀毒.bat
echo rem 保留最近10个报表 >>c:\mcafee\杀毒.bat
echo for /f "skip=10" %%%%i in ('dir *.html /o-d /b 2^^^>nul') do (del %%%%i) >>c:\mcafee\杀毒.bat
echo scan /adl /analyze /clean /timeout 15 /winmem /html "%%filename%%" >>c:\mcafee\杀毒.bat
echo echo 病毒扫描完毕,请按任意键打开报表... >>c:\mcafee\杀毒.bat
rem echo pause ^>nul >>c:\mcafee\杀毒.bat
echo if exist "%%filename%%" start "" "%%filename%%" >>c:\mcafee\杀毒.bat
cd /d c:\mcafee
start "mcafee virusscan" cmd /c 杀毒.bat
goto end
:error
pause >nul
:end
20061215: 修改scan.exe运行参数,增加 /program (扫描恶意软件)、/norename (不更改文件名)。
mcafee命令行参考手册:http://scz123.googlepages.com/mcafee5100wpg.pdf
1、使用本地的mcafee superdat来运行的脚本
2、使用局域网上共享的mcafee superdat来运行的脚本
--------------------------------------------------------------------------------
1、使用本地的mcafee superdat来运行的脚本
--------------------------------------------------------------------------------
@echo off
echo mcafee手动杀毒脚本
echo created by scz 20061101
echo =================================================
echo 建议在管理员环境下运行此脚本,以便能成功杀除病毒
echo =================================================
rem 此脚本运行需要mcafee的supperdat,下载地址:http://www.mcafee.com/apps/downloads/security_updates/superdat.asp?region=cn&segment=enterprise
rem supperdat下载后,请重命名为mcafee*.exe(*为任意字符)
if not exist mcafee*.exe (echo 病毒码不存在,无法执行下步操作,请按任意键退出... &goto error)
echo 正在释放病毒码...
for /f "skip=1" %%i in ('dir mcafee*.exe /o-d /b 2^>nul') do (del %%i)
for /f %%i in ('dir mcafee*.exe /b /o-d') do (%%i /e c:\mcafee & goto start)
:start
echo 启动扫描...
echo @echo off >c:\mcafee\杀毒.bat
echo echo. >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo echo mcafee手动杀毒脚本,扫描结束后会自动打开报表 >>c:\mcafee\杀毒.bat
echo echo created by scz 20061031 >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo set filename=%%date:-=%%.%%time::=%%.html >>c:\mcafee\杀毒.bat
echo cd /d c:\mcafee >>c:\mcafee\杀毒.bat
echo rem 保留最近10个报表 >>c:\mcafee\杀毒.bat
echo for /f "skip=10" %%%%i in ('dir *.html /o-d /b 2^^^>nul') do (del %%%%i) >>c:\mcafee\杀毒.bat
echo scan /adl /analyze /program /clean /norename /timeout 15 /winmem /html "%%filename%%" >>c:\mcafee\杀毒.bat
echo echo 病毒扫描完毕,请按任意键打开报表... >>c:\mcafee\杀毒.bat
echo if exist "%%filename%%" start "" "%%filename%%" >>c:\mcafee\杀毒.bat
cd /d c:\mcafee
start "mcafee virusscan" cmd /c 杀毒.bat
goto end
:error
pause >nul
:end
--------------------------------------------------------------------------------
2、使用局域网上共享的mcafee superdat来运行的脚本
--------------------------------------------------------------------------------
@echo off
echo mcafee手动杀毒脚本
echo created by scz 20061101
echo =================================================
echo 建议在管理员环境下运行此脚本,以便能成功杀除病毒
echo =================================================
rem 此脚本运行需要mcafee的supperdat,下载地址:http://www.mcafee.com/apps/downloads/security_updates/superdat.asp?region=cn&segment=enterprise
rem supperdat下载后,请重命名为mcafee*.exe(*为任意字符)
echo 正在连接远程计算机(scz)...
net use \\10.1.103.10 /user:scz\sczscz sczscz >nul 2>&1
net use x: /del /y >nul 2>&1
net use x: \\10.1.103.10\update >nul 2>&1 || (echo 网络异常,无法执行下步操作,请按任意键退出... &goto error)
cd /d x:\
if not exist mcafee*.exe (echo 病毒码不存在,无法执行下步操作,请按任意键退出... &goto error)
echo 正在释放病毒码...
for /f %%i in ('dir mcafee*.exe /b /o-d 2^>nul') do (%%i /e c:\mcafee & goto start)
:start
net use x: /del /y >nul 2>&1
net use \\10.1.103.10 /del /y >nul 2>&1
echo 启动扫描...
echo @echo off >c:\mcafee\杀毒.bat
echo echo. >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo echo mcafee手动杀毒脚本,扫描结束后会自动打开报表 >>c:\mcafee\杀毒.bat
echo echo created by scz 20061031 >>c:\mcafee\杀毒.bat
echo echo ============================================ >>c:\mcafee\杀毒.bat
echo set filename=%%date:-=%%.%%time::=%%.html >>c:\mcafee\杀毒.bat
echo cd /d c:\mcafee >>c:\mcafee\杀毒.bat
echo rem 保留最近10个报表 >>c:\mcafee\杀毒.bat
echo for /f "skip=10" %%%%i in ('dir *.html /o-d /b 2^^^>nul') do (del %%%%i) >>c:\mcafee\杀毒.bat
echo scan /adl /analyze /clean /timeout 15 /winmem /html "%%filename%%" >>c:\mcafee\杀毒.bat
echo echo 病毒扫描完毕,请按任意键打开报表... >>c:\mcafee\杀毒.bat
rem echo pause ^>nul >>c:\mcafee\杀毒.bat
echo if exist "%%filename%%" start "" "%%filename%%" >>c:\mcafee\杀毒.bat
cd /d c:\mcafee
start "mcafee virusscan" cmd /c 杀毒.bat
goto end
:error
pause >nul
:end
上一篇: 超简单超强悍的清理C盘垃圾文件方法
下一篇: 批处理应用根据文件内容进行重命名操作