Then this has to work...Right!!??!!

First look in the dir en pick the last Sdat file
then compare this with the value in the reg
if its the same then do nothing and if not then update...

$regPath="HKEY_LOCAL_MACHINE\SOFTWARE\"
$SdatPath="\\server\McAfee\"
$Sdat="sdat0000.exe"

$filer=dir($SdatPath + "SuperDAT\")
do
if "sdat"=substr($filer,1,4) and val(substr($filer,5,4))>val(substr($Sdat,5,4))
$Sdat=$filer
endif
$filer=dir()
until @error

$sDATVer=SUBSTR($Sdat,5,4)
$VS45DATValue = READVALUE($RegPath + "McAfee\VirusScan","szVirDefVer")
$VS45DATNum = SUBSTR($VS45DATValue,5,4)

IF VAL($sDATVer) > VAL($VS45DATNum)
GOTO "SuperDAT"
ELSE
GOTO "END"
ENDIF

:SuperDAT
RUN ($SdatPath + "SuperDAT\" + $sDAT + " /silent /prompt")
GOTO "END"

:END

[ 11 April 2002, 17:14: Message edited by: Noisy ]