NAV Automatic Download of New Virus Definitions
Novell Cool Solutions: Feature
By Ben Donohue
Digg This -
Posted: 5 Nov 2002
Recently we conducted a Cool Tools Contest and invited our readers to explain how they use any of the 500+ tools and utilities available on the Cool Tools page. We got some great entries, and are blown away by how useful those freebies are at solving real-life problems. Here's one of the top five award-winning entries.
- Tools in this Solution:
- FDATE.EXE (included in zip)
- MAKETXT.EXE (included in zip)
- URL2file.EXE (included in zip)
Download nav_auto.zip for all the files used in this article.
How to get all the workstations updated with the latest anti-virus definitions using a simple batch file. This solution uses a few DOS utilities, a Windows workstation and Novell ZENworks or even just the Novell login script.
Why it's a problem:
- People will not download the definitions on their own.
- We don't want to give all people web access.
- It's a waste of time to have everyone doing it themselves.
- We cannot take the chance of our organisation's e-mails going out with viruses.
- We cannot take the chance of incoming e-mails manually being checked.
- There is the chance of workstation downtime, lost productivity, etc.
- Automatically downloading the file from the Symantec website.
- File name changes frequently so you cannot ask for the same name all the time.
- Copying the file to all regions.
- Getting the files onto the workstations.
- Getting the files onto the workstations without user intervention.
- Staying up-to-date with the latest anti-virus definitions.
- Updating the workstations in a timely manner.
The solution is in three parts:
- A process that automatically runs several times a day.
- The process downloads the file, irrespective of name, renames it, and copies it to all servers.
- Definition copied onto all workstations without user intervention.
Using the AT command on a windows workstation we can get it to run a batch file several times a day and every day of the week. This can be copied into a file and saved as a batch file. It only needs to be run once as it is recurring every day. The AT command is setup like this?
at /del /y echo. echo. at 02:00 /interactive /every:M,T,W,Th,F,S,Su cmd /c c:\navup\go.bat at 08:30 /interactive /every:M,T,W,Th,F,S,Su cmd /c c:\navup\go.bat at 14:00 /interactive /every:M,T,W,Th,F,S,Su cmd /c c:\navup\go.bat at 20:30 /interactive /every:M,T,W,Th,F,S,Su cmd /c c:\navup\go.bat echo. echo. at echo. echo.
Cut and paste this into a DOS-based batch file. Call it whatever you like. Currently it is called go.bat.
@echo off cls if exist c:\navup\download.bat del c:\navup\download.bat if exist date del date if exist date.txt del date.txt if exist download.txt del download.txt copy blank.txt download.bat copy download.bat+start.txt download.bat maketxt download.bat /c copy download.txt download.bat del download.txt fdate /Fsub /N1 /Ommdd>date maketxt date /c copy download.bat+date.txt download.bat maketxt download.bat /c copy download.txt download.bat del download.txt copy download.bat+end001.txt download.bat maketxt download.bat /c copy download.txt download.bat type download.bat rem *** download file to server *** echo. echo. echo Downloading file from Internet... echo. echo. call download.bat if errorlevel==1 goto error rem *** copy to server or servers *** echo Distributing files to other servers... echo Copying file to YourServerName. net use r: \\servername\volumename
/user: del r:\ sarc-i32.exe copy c:\navup\sarc-i32.exe r:\ net use r: /del echo. echo. goto end :error echo. echo. echo There is currently no update. echo. echo. :end echo Process ended. echo. echo.
Other files needed in the directory you are running the download.bat from?
url2file http://securityresponse.symantec.com/avcenter/download/us-files/2002 with no carriage return or line feed.
-001-i32.exe sarc-i32.exe -x YourProxyServerNameHere -y 8080
FDATE.EXE from the Cool Solutions Free Tools site. Use this utility to get the correct date. I use it with the subtract feature because Australia is ahead of the US in time zones so we need to delete a day from the date given by FDATE.EXE to get the current file from the US site.
MAKETXT.EXE (included in zip) for stripping out CR/LF from text files. This or any other simple DOS utility that strips CR/LF from text files. This is needed for the download.bat file to be correctly made on a Windows 2000 workstation. Different windows platforms handle DOS batch file creation and appending a bit differently so experiment with other platforms.
URL2file.EXE (included in zip). Great utility that can download a file from a website from within a DOS box.
Novell Login script or ZENworks
The updated file can easily be distributed out the workstations via the Novell Login Script or via an Application object.
For Login Script?
Put the following in the container Login script to allow users to get the updated anti-virus file automatically upon login.
For Application Object?
Path to executable file?
Set other Application object options as you prefer.
Symantec also changes their update file to have a number in the name such as -001- or --002- etc. This number should reset to 001 each day on their website as it tells which version of the file for a given day. The download.bat file could be duplicated with end.txt files with 002, 003, etc to make sure you got the latest patch for the day. I don't think they would be updating the file more than a half dozen times a day. A daily update for the anti-virus should be sufficient for most organisations.
URL2file.EXE has switches to use proxy servers. Use -x and -y switches if you need to.
FDATE.EXE. Use Fdate /ff /ommdd for downloading the update in the US.
If you have any questions you may contact Ben at email@example.com
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com