need Last Scan Time for LOGON.CMD

Hello Avast-Women and Avast-Men and all the others. :smiley:

I have many avast-professional installations.
I want to collect informations about the LAST-HDD-Scan of the clients, when the logon script of my
samba server is running.
in case of viruses, i become a mail. thats works fine.
where can i find the information , so i can read and handle it? ???

on the clients i have win98 and some winxp.
i dont want the BIG SQL admin tool :slight_smile:
the mirror-tool is running fine for me :wink:

i hope somebody can help

greets dr.mow

I can only guess, Iā€™m not an expert on server systems.
Maybe the [Simple] section on avast4.ini file could give the answer on value TimeOfLastScanā€¦

thx for the answer.
i looked in my file and find something like this: TimeOfLastScan=1110872110

if i could parse the file ( howto??) the information is not useable for me.
i need somthing like 15/03/2005 8:35

is there in the registry a place, where i can extract the info?
i am blind? i dont have find a human readable information, only in then GUI of AVAST.

Dr.MoW

more information, and than another question:

i find out that i can see in the file: Simple user interface.txt
in my folder : C:\Programme\Avast\DATA\report

when the last scan was.

okay, great. but how can in cut the lines out with command.com / windows tools. ???
if i had a linux system, i could write a script ;D

With Windows, write a script (and compile it) with AutoIt :wink:

thx for the info. it was new to me, that there is this tool in the wild. :slight_smile:
okay, i will do my best to solve my problem.

i have checked the tool. it is nice :slight_smile: ;D
my little programm runs fineā€¦ it reads the correct line in : simple user interface.txt.
BUT :-
if i start my avast-ball, i can see that the last complete scan was on 23/3 but in the file
the last line says 22/3.

where can i find the information that the programm tells the user? ???
i think avast4.ini but the information is not human readable.
who can help me to collect the correct informartion? ???

The value is indeed written in avast4.ini - section [Simple], the value TimeOfLastScan.
The value written there is actually the result of the time() function, i.e. represented as the number of seconds elapsed since midnight, January 1st, 1970.

hi igor. thanks for the information. ;D
i use ā€œautoitā€ to do the work. but there isnt any function that calculates the seconds in human readable format. :-[
so i took, my case, on the wishlist. 8)
i knew of the function in other program-languages, like c or progress. :wink:

i hope that this ā€œfeatureā€ will be integrated :-*

Itā€™s very easy to convert this by any tool. Example might be here:
http://www2.asw.cz/~rypacek/humantime.zip

echo TimeOfLastScan=1111473034 | humantime

gives you:
TimeOfLastScanHuman=Tue Mar 22 07:30:34 2005

Hi lukor! :-*

Thx for the file. i have modified my program, so it runs fine.
My program read the avast4.ini, take out the string, runs your external programm and
with the answer and some other informations, it writes a file (CSV).

if any interested, let me know.

this solved my problem. :smiley: :smiley:

;D So, the thread can be closed ;D

Can you teach me how to ā€˜readā€™ an avast.ini file value, change it, save the file, locate the file into different foldersā€¦
I donā€™t know about programming but I think it could help to make a GUI for changing hidden/advanced options into avast4.ini file.
Thanks.

hello :smiley:
this is a example how i find out the string ā€œTimeOfLastScanā€
in the avast.ini. i have hardcoded the $lesedatei.
feel free to program a user-update field.

the code is between SNIP/SNAP :slight_smile: the sound of a shears.

sorry, but for more detailed infos, take a look to the link
where you can find the docs.

http://www.autoitscript.com/autoit3/docs/

greets dr.mow

============ SNIP ===================================
$lesefile = ā€œā€
$lesedatei = ā€œC:\Programme\Avast\DATA\avast4.iniā€
$vorhanden = 0
$treffer = ā€œā€
$pruefstring = ā€œTimeOfLastScanā€

;
; avast4.ini datei im lesemodus oeffnen
;
$lesefile = FileOpen($lesedatei, 0)
;
; Check if file opened for reading OK
;
If $lesefile = -1 Then
;keinen hinweis an den user
;MsgBox(0, ā€œErrorā€, ā€œUnable to open file.ā€)
Exit
EndIf
;
; Read in lines of text until the EOF is reached
;
While 1
$line = FileReadLine($lesefile)
If @error = -1 Then ExitLoop

$vorhanden = StringInStr($line, $pruefstring)

If $vorhanden <> 0 Then
   $treffer = $line 
   Exitloop 
EndIf

Wend
FileClose($lesefile)
============ SNAP ===================================

Thanksā€¦ Iā€™ll take a look later on how could I find something similar for my avast! Tweaker.