To update your McAfee antivirus engine and/or signature files with shell scripting, proceed as follows:
- Create a new directory to store all files included in this example.
- Select Start|Run and enter “scriptfile.bat.”
Here, scriptfile is the full path and file name of a script file that contains the following:
@Echo Off
CLS
Set SDAT=”superdat”
Set DAT=”datfile”
Set NAILOG=”textlog”
Set DDAY=”DOTW”
For /F “Tokens=1” %%I in (‘Date /T’) Do Set Day=%%I
If %DAY% EQU %DDAY% Goto UENGINE
%DAT% /F /PROMPT /REBOOT /SILENT /LOGFILE
%NAILOG%
GOTO END
:UENGINE
%SDAT% /F /PROMPT /REBOOT /SILENT /LOGFILE %NAILOG%
GOTO END
:END
Set SDAT=
Set DAT=
Set NAILOG=
Set DAY=
Here, SDAT is a variable containing the complete path and file name of the SuperDAT executable; DAT is a variable containing the complete path and file name of the DAT executable; NAILOG is a variable containing the complete path and file name of the status log text file; and DDAY is the day of the week (Mon, Tue, Wed, Thu, Fri, Sat, Sun) to run the SuperDAT as opposed to the daily DAT file.