NOTE: You must save the nod32 logs to the below path
my anti virus value is
"C:\Program Files\ESET\nod32.exe" /pattern+ /heur+ /scanboot- /scanmbr- /scanmem- /arch+ /sfx+ /pack+ /list- /sound- /subdir- /expire- /selfcheck- /quit+ /logrewrite /log=C:\PROGRA~1\hMailServer\Logs\Nod32\NOD32.log "%FILE%"
my code im using is a bit different, but its basically the same.
Code: Select all
Dim fso, MyFile, ReadLineTextFile Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile = fso.OpenTextFile("C:\Program Files\hMailServer\Logs\Nod32\NOD32.log", 1,false) Do While MyFile.AtEndOfStream <> True ReadLineTextFile = MyFile.ReadLine 'look for and stores a line with .zip text If instr(1,ReadLineTextFile,"»ZIP",vbTextCompare) > 0 then SaveLine = ReadLineTextFile End If 'looks for number of viruses found >0 If left(ReadLineTextFile,24 )="Number of threats found:" then NumFound = int(trim(right(ReadLineTextFile,len(ReadLineTextFile)-24))) if NumFound > 0 then str1 = mid(SaveLine,instr(1,SaveLine,"»ZIP"),instr(1,SaveLine," - ") - instr(1,SaveLine,"»ZIP")) str2 = right(SaveLine,len(SaveLine) - instr(1,SaveLine," - ") - 2) msgbox "Virus_Info = " & str1 & vbCRLF & "Virus_Discription = "& str2 else msgbox "No threats found" End If End If Loop MyFile.close
Hope others find this usefully. i may make a more detailed how-to later on how i did the event log and other info ive done. i was building a support site, with things ive done, but ive recently changed my work and don't have time to build it any longer (maybe some other time)