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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configure NAVCE Daily Updates

Symantec AntiVirus CorpEd

Configure NAVCE Daily Updates

by  Auger282  Posted    (Edited  )
Configure NAVCE Daily Updates

This is an FAQ on how to keep your NAVCE clients up to date with the most current updates. With the system laid out below I keep my 250+ clients up to date with yesterdayÆs or todayÆs virus definitions.

Why do this?
There was a time when weekly updates were good enoughà that time has passed. In the current virus/spy-ware ridden internet itÆs of the utmost importance to keep your clients with the latest and greatest virus definitions.

My current setup is a basic box with NAVCE 10.0.2.2000 with a basic connection to the internet.

There are two scripts I have scheduled in my windows scheduler named ôXDBdown.cmdö and ôXDBdown_cleanup.batö they are both located in the root of my WINNT directory. Their contents are below (do not include --- comments)

As for scheduling I have XDBdown.cmd running every hour, everyday checking the FTP for a new def file. If it sees a new file it will download it and push it out. XDBdown_cleanup.bat runs once a month on the 1st. The Log file stores the result of every attempt that XDBdown tries to download new defs (can get large fast). There are times when I like to check the log to see when Symantec is updating but this info isnÆt worth keeping a long history on. (The log file is also located in the root of the WINNT folder)

The Symantc instructions and documentation for the XDBdown script can be found at the following link:
http://service1.symantec.com/SUPPORT/ent-security.nsf/docid/2004061116024848?Open&docid=2005040711404048&nsf=ent-security.nsf&view=docid&dtype=corp

Take a look down through the XDBdown.cmd script to understand what itÆs doingà it has been commented and should be self explanatory. Please be sure to change paths if you havenÆt performed a default path install.

***Side note: For my desktop clients I have liveupdate disabled completely. But for my laptop users I have left it enabled and scheduledà I have some laptop users that take long trips and they would not receive any updates during this time if liveupdate was completely disabled.

Code:
-----XDBdown.log snippet-----
Tue 08/01/2006 13:12:12.84  Already downloaded latest xdb file: vd21fe10.xdb - size 14336921 
Tue 08/01/2006 14:12:01.04  Already downloaded latest xdb file: vd21fe10.xdb - size 14336921 
Tue 08/01/2006 15:13:34.89  Downloaded new xdb file: vd220212.xdb - size 15257365 
Tue 08/01/2006 16:12:01.89  Already downloaded latest xdb file: vd220212.xdb - size 15257365 
Tue 08/01/2006 17:12:11.53  Already downloaded latest xdb file: vd220212.xdb - size 15257365 
Tue 08/01/2006 18:12:02.67  Already downloaded latest xdb file: vd220212.xdb - size 15257365 
Tue 08/01/2006 19:12:00.82  Already downloaded latest xdb file: vd220212.xdb - size 15257365 
Tue 08/01/2006 20:12:00.76  Already downloaded latest xdb file: vd220212.xdb - size 15257365
-----End XDBdown.log snippet-----

Code:
-----XDBdown.cmd----- (You can download a copy of this cmd file from the Symantec link in the above instructions)-----
@set COPY_XDB_TO="c:\Program Files\Symantec AntiVirus\"
@set RAPIDRELEASE=0
@set XDBTEMP=%temp%

@rem ==============================================================================================
@rem Set RAPIDRELEASE=1 to download repidrelease definitions, RAPIDRELEASE=0 for fully QA'd definitions (standard).
@rem Change COPY_XDB_TO= to point to the SAV CE server directory (or where you want the XDB file copied)
@rem   you can also run the script directly from the SAV folder and it will copy the definitions there.
@rem XDBTEMP is the temp folder the script will use while downloading definitions, set to %temp% to use system default
@rem ==============================================================================================
@rem  Script for downloading virus definition updates for
@rem  Symantec Antivirus Corporate Edition version 8.x and 9.x
@rem  This unsupported utility is provided for your convenience only.
@rem  Symantec Technical Support cannot provide support for the creation,
@rem  use, or troubleshooting of Windows scripts.

@rem ==============================================================================================
@echo off


rem   ========= check that OS is win2k or better ============
if not "%OS%" == "Windows_NT" goto BADOS
if "%APPDATA%" == "" goto BADOS

rem   ========= make sure to be in script directory ============
if exist rtvscan.exe set COPY_XDB_TO=%CD%
for %%i in (%0) do @%%~di
for %%i in (%0) do @cd %%~pi
if exist rtvscan.exe set COPY_XDB_TO=%CD%

rem   =========== get name/size of last file from "xdbdown.lastfile" ============
if not exist xdbdown.lastfile goto NOLAST
for /f "tokens=1" %%f in (xdbdown.lastfile) do set lastfile=%%f
for /f "tokens=2" %%f in (xdbdown.lastfile) do set lastsize=%%f
:NOLAST

rem   ========= jump to temp dir ============
if not exist "%XDBTEMP%\xdbtmp" md "%XDBTEMP%\xdbtmp"
if exist "%XDBTEMP%\xdbtmp\*.xdb" del "%XDBTEMP%\xdbtmp\*.xdb"
pushd "%XDBTEMP%\xdbtmp"

rem   =========== make ftp script for checking xdb directory on ftp ===========
echo open ftp.symantec.com> check.txt
echo anonymous>> check.txt
echo email@address.com>> check.txt
set xdbfolder=xdb
if "%RAPIDRELEASE%" == "1" set xdbfolder=rapidrelease
echo cd AVDEFS/norton_antivirus/%xdbfolder%>> check.txt
echo dir *.xdb chk.lst>> check.txt
echo bye>> check.txt

rem   =========== get filename and size from ftp ============
if exist chk.lst del chk.lst
ftp -s:check.txt
if not exist chk.lst goto ERROR
for /f "tokens=9" %%f in (chk.lst) do set xdbfile=%%f
for /f "tokens=5" %%f in (chk.lst) do set xdbsize=%%f
if "%xdbfile%" == "" goto ERROR
if "%xdbsize%" == "" goto ERROR

rem   =========== compare ftp name/size to local ============
if not "%xdbfile%" == "%lastfile%" goto DOWNLOAD
if not "%xdbsize%" == "%lastsize%" goto DOWNLOAD
popd
echo.
echo Already downloaded latest %xdbfolder% file: %xdbfile% - size %xdbsize%
echo %date% %time%  Already downloaded latest %xdbfolder% file: %xdbfile% - size %xdbsize% >> XDBdown.log
goto END

:DOWNLOAD
rem   ========= make ftp script for downloading new xdb file =========
echo open ftp.symantec.com> down.txt
echo anonymous>> down.txt
echo email@address.com>> down.txt
echo cd AVDEFS/norton_antivirus/%xdbfolder%>> down.txt
echo bin>> down.txt
echo hash>> down.txt
echo get %xdbfile%>> down.txt
echo bye>> down.txt

rem   ============= download new file =================
ftp -s:down.txt
for %%i in (%xdbfile%) do @set newsize=%%~zi
if not "%newsize%" == "%xdbsize%" goto ERROR
move %xdbfile% %COPY_XDB_TO%
if exist %xdbfile% goto ERRORMOVE
popd
echo.
echo %xdbfile% %xdbsize% > xdbdown.lastfile
echo Downloaded new %xdbfolder% file: %xdbfile% - size %xdbsize%
echo %date% %time%  Downloaded new %xdbfolder% file: %xdbfile% - size %xdbsize% >> XDBdown.log
goto END


:ERROR
popd
echo.
echo ERROR: problem downloading %xdbfolder% definition file. xdbfile=%xdbfile% xdbsize=%xdbsize% newsize=%newsize% (lastfile=%lastfile% lastsize=%lastsize%).
echo %date% %time%  ERROR: problem downloading %xdbfolder% definition file. xdbfile=%xdbfile% xdbsize=%xdbsize% newsize=%newsize% (lastfile=%lastfile% lastsize=%lastsize%). >> XDBdown.log
type "%XDBTEMP%\xdbtmp\chk.lst" >> XDBdown.log
echo.  >> XDBdown.log
goto END

:ERRORMOVE
popd
echo.
echo ERROR: problem moving definition file to SAV folder. COPY_XDB_TO=%COPY_XDB_TO%  newsize=%newsize% (lastfile=%lastfile% lastsize=%lastsize%).
echo %date% %time%  ERROR: problem moving definition file to SAV folder. COPY_XDB_TO=%COPY_XDB_TO%  newsize=%newsize% (lastfile=%lastfile% lastsize=%lastsize%). >> XDBdown.log
goto END

:BADOS
echo.
echo ERROR: this script needs Windows 2000 or better.
echo %date% %time%  ERROR: this script needs Windows 2000 or better. >> XDBdown.log
goto END

:END
if exist "%XDBTEMP%\xdbtmp\check.txt" del "%XDBTEMP%\xdbtmp\check.txt"
if exist "%XDBTEMP%\xdbtmp\down.txt" del "%XDBTEMP%\xdbtmp\down.txt"
if exist "%XDBTEMP%\xdbtmp\chk.lst" del "%XDBTEMP%\xdbtmp\chk.lst"
rd "%XDBTEMP%\xdbtmp"
set COPY_XDB_TO=
set RAPIDRELEASE=
set lastsize=
set lastfile=
set newsize=
set xdbsize=
set xdbfile=
set xdbfolder=
set xdbtemp=
-----End XDBdown.cmd-----

Code:
-----XDBdown_cleanup.bat-----
del "C:\WINNT\XDBdown.log"
-----End XDBdown_cleanup.bat-----
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