Novell is now a part of Micro Focus

Antivirus Definition Update Script

Novell Cool Solutions: Trench
By Roger Fenner

Digg This - Slashdot This

Posted: 12 Feb 2003

We are a NetWare 5.1/6 shop running ZEN 3.2. We currently update virus definition files by downloading the update, copying it to the distribution directory, and having a ZEN application push it out based on the version number being updated.

After scouring websites for a way to automate this, I found nothing. So, I wrote an NSN script to do it. It's a very quick and dirty script, but it works. I'm submitting a generic version for everyone to use. It should be pretty self-explanatory.

Hope this helps!


This script is used to FTP the latest virus definition file from a software provider. It then copies the file to the distribution directory on another server and then increments the version number for the ZEN application object.

'Get a file from remote host
set virussoftwareproviderFTP = createobject ("ucx:ftpfilemgr")
' Create FTP Manager Object
virussoftwareproviderFTP.server = ""
' Define FTP Server
virussoftwareproviderFTP.login ("anonymous", "")
' Perform anonymous login
virussoftwareproviderFTP.BinMode = True
' Set FTP for binary transfer
' change local directory
' change remote directory
set virussoftwareproviderDir = virussoftwareproviderFTP.currentDir
' Create current directory object
set entries = SymantecDir.getchildren()
' Get child entries of current directory
entries.Get ("symcdefsx86.exe","navdefup.exe")
' Perform FTP GET on file and save
as a different filename
' Logout of FTP server
' Authenticate to Tree
Set nwdir=CreateObject ("UCX:NWDIR")
' Create DS object
if (nwdir.login (".NAVUpdateUser.YourOrganizaion.YourTreeName",
"password")) Then
' Login and check for success

' Copy file
Set FSO = CreateObject("Scripting.FileSystemObject")
' create file system object

' Copy file to final destination, set overwrite flag to true
' Update version number in Application object
Set AVApp=nwdir.FindEntry("NDS:\\YourTreeName\DSPathToObject\ZEN
Antivirus Definition Update Object") ' Get the Zen object for the
definition push
' Get the version number
' Increment the value
' Set version number in object
to incremented value
' Update the object
' End check for success
' Logout

Roger is a Sr. Systems Engineer at Comair, Inc. If you have any questions you may contact him at

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates