Set objFS = CreateObject("Scripting.FileSystemObject") 'File to scan strFile = "C:\Program Files (x86)\Panda Security\WaAgent\WalTest\WALTEST.DAT" 'strFile = "C:\temp\WALTEST.DAT" 'Pattern to search for, eg Hello strPattern = "" Set objFile = objFS.OpenTextFile(strFile) Do Until objFile.AtEndOfStream strLine = objFile.ReadLine If InStr(strLine,strPattern) Then strLine = Mid(strLine, 13, 10) 'WScript.Echo strLine H=strLine End If Loop 'Find date from WALTEST.DAT and convert to date-format. LookupDate=CDate(H) 'Subtrackt 3 days from date (I don't want to receive an alert when 1 day out of date) DateBuffer = dateadd("d", -2, date()) if DateValue(LookupDate) => DateValue(DateBuffer) then wscript.echo LookupDate & " " & "Up-to-date" wscript.quit(0) end if if DateValue(LookupDate) < DateValue(DateBuffer) then wscript.echo LookupDate & " " & "Antivirus is out-of-date." wscript.quit(1) end if