Sophos: Using SGET to auto-update...

  • Thread starter Thread starter Brendan DJ Murphy
  • Start date Start date
B

Brendan DJ Murphy

I regularly receive the Monthly CD updates from the company I work for.

However, to ensure that I remain bang up to date, I have written a little MSDOS batch file (which
uses SGET to retrieve files from a web-server).

I use my Windows Scheduler to run my batch-file at regular intervals...

Here is my batch-file:

set VER=378
c:
cd c:\program*\sophos*
del *.ide
DEL *IDES.EXE
sget http://www.sophos.com/downloads/ide/%VER%_ides.exe
%VER%_ides.exe
NET STOP SWEEPSRV.SYS
NET START SWEEPSRV.SYS

Every time I update Sophos, I change the value of "VER" in the file accordingly.

Is there any way to automatically detect my current version in my program so that I dont have to
edit the file every time I update Sophos.

Many Thanks
 
In Brendan DJ Murphy <[email protected]> muttered:

Is there any way to automatically detect my current version in my
program so that I dont have to edit the file every time I update
Sophos.

No, there isn't any way using simple batch language, although if you wanted
to use PERL or SED or something similar, you can extract the registry value:
HKEY_LOCAL_MACHINE\SOFTWARE\Sophos\SweepNT\Version and construct the correct
version string.

However, a far better idea would be to always make sure you are running the
current CD version (ie. *don't* download it 7 days early), then use SGET to
just download http://www.sophos.com/downloads/ide/ides.exe each time
(self-extractor). You don't have to worry about downloading specific IDES,
as they are eventually incorporated into the product and are not required.

You should also consider using WGET as opposed to SGET. It's more featured
and robust.

Cheers,
Steve :)
--
 
Brendan DJ Murphy said:
I regularly receive the Monthly CD updates from the company I work for.

Brendan,

You can use Sweep Update 1.0.6 to keep your definitions current.

It works from the GUI and offers one-click-download and installation.
On NT/2000/XP, the service gets restarted, resulting in immediate use
of the new definitions.

For use in schedulers, it can be called in an unattended mode from
batchfiles.

Sweep Update is downloadable from http://home.htp-tel.de/drackow

Bye,

Detlev
 
Back
Top