#42647 - 2003-07-09 02:34 PM
Using ReadFile output
|
The_Apprentice
Fresh Scripter
Registered: 2003-05-30
Posts: 16
Loc: Guildford, England
|
Afternoon,
Just a quick question. aren't they all
I ammusing the ReadFile function, and try to capture some of the text. Extract of code is....
$file = 'C:\Program Files\Sophos Sweep for NT\NTInst\i386\sav.cfg' for each $line in ReadFile($file,,-1) $line ? ; confirms this bit is working next if @error "error @error" endif $vsoph = RIGHT($line,2) $vsoph ?
The ReadFile returns the line I want. eg: SerialNumber=43 I then want to capture the last two characters (43), but am not getting anything back. I think the code is right.
Any ideas please.
Many thanks in advance
|
|
Top
|
|
|
|
#42649 - 2003-07-09 02:52 PM
Re: Using ReadFile output
|
The_Apprentice
Fresh Scripter
Registered: 2003-05-30
Posts: 16
Loc: Guildford, England
|
Many thanks.
I can now use the output to check against a registry entry on the clients to confirm all is up to date.
|
|
Top
|
|
|
|
#42651 - 2003-07-09 04:25 PM
Re: Using ReadFile output
|
The_Apprentice
Fresh Scripter
Registered: 2003-05-30
Posts: 16
Loc: Guildford, England
|
Ahhhhhhhhhhhhh. When sophos downloads the new IDE files, it updates the sav.cfg in the NTInst folder with the new version, it is just an incremented number.
When the clients do a scheduled update from the "distribution" server the value in sav.cfg is written to the registry of the client.
So, if you compare the two values you know the status.
The main reason we have to do this, is 'cos of security on the network I am monitoring, SAVADMIN can not see the clients
.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 756 anonymous users online.
|
|
|