Batch application McAfee manual antivirus script

Time:2021-10-22

This script uses McAfee’s supplerdat to check and kill viruses on the computer. Check the supplerdat update using FlashGet. Refer to: http://blog.csdn.net/scz123/archive/2006/11/02/1362573.aspx

20061215:   Modify the running parameters of scan.exe and add  / PROGRAM   (scan for malware), / norename   (do not change the file name).
McAfee command line reference manual: http://scz123.googlepages.com/Mcafee5100wpg.pdf

1. Use local McAfee   Superdat to run the script
2. Use McAfee shared on LAN   Superdat to run the script

 

 

——————————————————————————–
1. Use local McAfee   Superdat to run the script

——————————————————————————–
@echo off
echo   McAfee manual antivirus script
echo created by scz 20061101
echo =================================================
echo   It is recommended to run this script in the administrator environment in order to successfully kill the virus
echo =================================================

rem   McAfee’s supplerdat is required to run this script. Download address: http://www.mcafee.com/apps/downloads/security_ updates/superdat.asp?region=cn&segment=enterprise
rem   After the suppldat is downloaded, please rename it McAfee *. Exe (* is any character)

if   not   exist   mcafee*.exe   (echo   The virus code does not exist, unable to perform the next operation, please press any key to exit  & goto   error)
echo   Releasing virus code
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   Start scan

echo  @ echo   off  > c: \ McAfee \ antivirus.bat
echo   echo.  >> c: \ McAfee \ antivirus.bat
echo   echo  ============================================ >> c: \ McAfee \ antivirus.bat
echo   echo   McAfee manual antivirus script will automatically open the report after scanning  >> c: \ McAfee \ antivirus.bat
echo   echo   created   by   scz   twenty million sixty-one thousand and thirty-one  >> c: \ McAfee \ antivirus.bat
echo   echo  ============================================ >> c: \ McAfee \ antivirus.bat
echo   set   filename=%%date:-=%%.%%time::=%%.html  >> c: \ McAfee \ antivirus.bat
echo   cd  / d   c:\mcafee  >> c: \ McAfee \ antivirus.bat
echo   REM   Keep the last 10 reports  >> c: \ McAfee \ antivirus.bat
echo   for  / f   “skip=10”  %%%% i   in   (‘dir  *. html  / o-d  / b   2^^^>nul’)   do   (del  %%%% i)  >> c: \ McAfee \ antivirus.bat
echo   scan  / ADL  / ANALYZE  / PROGRAM  / CLEAN  / NORENAME  / TIMEOUT   fifteen  / WINMEM  / HTML   “%%filename%%”  >> c: \ McAfee \ antivirus.bat
echo   echo   After virus scanning, please press any key to open the report  >> c: \ McAfee \ antivirus.bat
echo   if   exist   “%%filename%%”   start   “”   “%%filename%%”  >> c: \ McAfee \ antivirus.bat

cd /d c:\mcafee
start   “McAfee   VirusScan”   cmd  / c   Antivirus.bat
goto end

:error
pause >nul
:end

 

 

——————————————————————————–
2. Use McAfee shared on LAN   Superdat to run the script
——————————————————————————–
@echo off
echo   McAfee manual antivirus script
echo created by scz 20061101
echo =================================================
echo   It is recommended to run this script in the administrator environment in order to successfully kill the virus
echo =================================================

rem   McAfee’s supplerdat is required to run this script. Download address: http://www.mcafee.com/apps/downloads/security_ updates/superdat.asp?region=cn&segment=enterprise
rem   After the suppldat is downloaded, please rename it McAfee *. Exe (* is any character)

echo   Connecting to remote computer (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   Network exception, unable to perform the next operation, please press any key to exit  & goto   error)

cd /d x:\
if   not   exist   mcafee*.exe   (echo   The virus code does not exist, unable to perform the next operation, please press any key to exit  & goto   error)
echo   Releasing virus code
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   Start scan

echo  @ echo   off  > c: \ McAfee \ antivirus.bat
echo   echo.  >> c: \ McAfee \ antivirus.bat
echo   echo  ============================================ >> c: \ McAfee \ antivirus.bat
echo   echo   McAfee manual antivirus script will automatically open the report after scanning  >> c: \ McAfee \ antivirus.bat
echo   echo   created   by   scz   twenty million sixty-one thousand and thirty-one  >> c: \ McAfee \ antivirus.bat
echo   echo  ============================================ >> c: \ McAfee \ antivirus.bat
echo   set   filename=%%date:-=%%.%%time::=%%.html  >> c: \ McAfee \ antivirus.bat
echo   cd  / d   c:\mcafee  >> c: \ McAfee \ antivirus.bat
echo   REM   Keep the last 10 reports  >> c: \ McAfee \ antivirus.bat
echo   for  / f   “skip=10”  %%%% i   in   (‘dir  *. html  / o-d  / b   2^^^>nul’)   do   (del  %%%% i)  >> c: \ McAfee \ antivirus.bat
echo   scan  / ADL  / ANALYZE  / CLEAN  / TIMEOUT   fifteen  / WINMEM  / HTML   “%%filename%%”  >> c: \ McAfee \ antivirus.bat
echo   echo   After virus scanning, please press any key to open the report  >> c: \ McAfee \ antivirus.bat
rem   echo   pause  ^> nul  >> c: \ McAfee \ antivirus.bat
echo   if   exist   “%%filename%%”   start   “”   “%%filename%%”  >> c: \ McAfee \ antivirus.bat

cd /d c:\mcafee
start   “McAfee   VirusScan”   cmd  / c   Antivirus.bat
goto end

:error
pause >nul
:end