Updating McAfee Antivirus Files

Posted: May 1, 2010 in Logon Script with Shell
Tags:


To update your McAfee antivirus engine and/or signature files with shell scripting, proceed as follows:

  1. Create a new directory to store all files included in this example.
  2. 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.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s