Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to automate McAfee DAT File Updates

Login Scripts

How to automate McAfee DAT File Updates

by  djhawthorn  Posted    (Edited  )
This is a McAfee Login script which does automatic updates. There is a tad of admin overhead, but it works.. (Works for both 9x and NT4/2K machines).

When you need to update McAfee on all PCs, just put the new S/DAT file (renamed to 'setup.exe') in a share available to everyone at \\server1\Updates. Then just modify the values for "OldDATVersion" and "NewDATVersion" in the login script.



@echo off
REM **************************************************************************
REM Update McAfee DAT Files
REM **************************************************************************

REM ==========================================================================
REM Setup Variables and Check for the Operating System.
REM ==========================================================================

set OldDATversion=DAT-4223.tok
set NewDATversion=DAT-4227.tok
set SourceDir=\\server1\Updates

if "%OS%" == "Windows_NT" goto WinNT
goto Win95



REM ==========================================================================
REM Windows 95 Update
REM ==========================================================================
:Win95
REM --------------------------------------------------------------------------
REM If McAfee isn't installed, or is already updated, then we are done.
REM --------------------------------------------------------------------------
if not exist "C:\Program Files\Network Associates\McAfee VirusScan\scan.dat" goto End
if exist %windir%\%NewDATversion% goto End


REM --------------------------------------------------------------------------
REM Let's rock!!!
REM --------------------------------------------------------------------------

echo ********************************************************
echo * *
echo * Updating McAfee DAT Files - Please Wait... *
echo * *
echo ********************************************************

if exist %windir%\%OldDATversion% del %windir%\%OldDATversion%
%SourceDir%\setup.exe /SILENT /LOGFILE %windir%\%NewDATversion%

goto End



REM ==========================================================================
REM Windows NT Update
REM ==========================================================================
:WinNT
REM --------------------------------------------------------------------------
REM If McAfee isn't installed, or is already updated, then we are done.
REM --------------------------------------------------------------------------
if not exist "C:\Program Files\Network Associates\VirusScan\vshwin32.exe" goto End
if exist %SystemRoot%\%NewDATversion% goto End


REM --------------------------------------------------------------------------
REM Let's rock!!!
REM --------------------------------------------------------------------------

echo ********************************************************
echo * *
echo * Updating McAfee DAT Files - Please Wait... *
echo * *
echo ********************************************************

if exist %SystemRoot%\%OldDATversion% del %SystemRoot%\%OldDATversion%
%SourceDir%\setup.exe /SILENT /LOGFILE %SystemRoot%\%NewDATversion%

goto End



:End
REM ==========================================================================
REM Unset the variables used and we are done.
REM ==========================================================================
set OldDATversion=
set NewDATversion=
set SourceDir=
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top