NTDOC,
OK, here's the same functionality rewritten for 3.62. I assume it would work for 3.63 as well.
code:
Break on
$Index = 0
$X = 0
Dim $FNArray[9]
$FNewest = 0
$NewLine ="Current NAV Virus Definition File Date: "
$FileName = Dir("C:\Program Files\Common Files\Symantec Shared\VirusDefs\*.*")While $FileName <> "" and @ERROR = 0
If Val($FileName) <> 0
$FNArray[$Index] = Val($FileName)
$Index = $Index + 1
EndIf
$FileName = Dir()
Loop
While $X < $Index
If $FNArray[$X] > $FNewest
$FNewest = $FNArray[$X]
EndIf
$X = $X + 1
Loop
$VPDate = Substr("$FNewest",5,2) + "/" + Substr("$FNewest",7,2) + "/" + Substr("$FNewest",1,4)
If exist ("C:\Inetpub\wwwroot\VirusPattern2.txt")
Del "C:\Inetpub\wwwroot\VirusPattern2.txt"
EndIf
If Open(1,"C:\Inetpub\wwwroot\VirusPattern2.txt",5) = 0
$ = WriteLine(1,$NewLine + $VPDate)
EndIf
$ = Close(1)
Copy "C:\Inetpub\wwwroot\VirusPattern2.txt" "C:\Inetpub\wwwroot\VirusPattern.txt"
Get $
I wrote this little snippet of code to run under Task Scheduler on my intranet server. While my network is on 3.62, I put RC3 on my web server.It was only tested on the one server as it was never intended to be used elsewhere.
What this does is to search for the folders that hold the pattern files. They are named as 20011017.005, 20011026.021, etc. which is YYYYMMDD and the .005 is the fifth letter of the alphabet (e) etc. I ignore the extension.
SInce NAV keeps older pattern folders, I needed to determine the newest. then I concatenate a string of text with the date formatted the same way as it appears in NAV.
Current NAV Virus Definition File Date: 10/26/2001
This becomes a one-line file that, through server-side includes becomes part of our home page. It is meant to raise awareness for our home users (unmanaged) to make sure they have the most recent pattern.