Sophos Anti-Virus

Has anyone written any Scripts for this software??

I’ve written most of the script I need, it’s the last part that’s got me stuck!!

When Sophos has finished scanning the Hard Drive (or what ever) I need it to quit, but not before!

Hope Someone can help.
Ben.

ben,

I just found your post and I was wondering if you did include in your script the updating of Sophos, the program itself or the IDEs?

I have a script where I can mount the remote drive (where the central installation folder is), and open sophos, but I don’t even know how to set applescript to “hit okay” when the message “sophos anti-virus will be restarted” comes up.

I guess I’ll just have to quit afterwards, right?

Any help is appreciated.

Ben,

I just found your post and I was wondering if you did include in your script the updating of Sophos, the program itself or the IDEs?

I have a script where I can mount the remote drive (where the central installation folder is), and open sophos, but I don’t even know how to set applescript to “hit okay” when the message “sophos anti-virus will be restarted” comes up.

I guess I’ll just have to quit afterwards, right?

Any help is appreciated.

akapass

I have manged to write a script that connects to the remote drive and then on a set day run a full scan and quits.

Unfortunatley I don’t have the script to hand but I will post here soon, over the weekend sometime.

The script is written for OS9

Regards Ben.

I have OS X, so I guess I’ll have to figure out what’s different.

Thanks anyways. :smiley:

akapass

The script was written for OS9 but it will run in OSX.

Here is my script:

set scheduleScan to Monday – Day of System Scan
set theDate to current date

set theVolume to “Sophos OS9”
set theServer to “Xeus”
set theZone to “*”
set theName to “username”
set thePassword to “password”

if the weekday of theDate = scheduleScan then

display dialog ¬
	"Sophos Scheduler for Mac OS 9" & return & return & ¬
	"Sophos needs to Scan your System." & return & ¬
	"Press OK to run and Cancel to Quit." giving up after 10
with timeout of 864000 seconds
	tell application "Finder"
		set theObject to (a reference to startup disk)
		set theName to (name of startup disk) as string
		tell application "Sweep"
			activate
			set name of window 1 to "Scheduled scan of " & theName
			try
				open theObject as alias
			end try
			quit
		end tell
	end tell
end timeout

else
tell application “Finder”
try
mount volume theVolume on server theServer in AppleTalk zone theZone ¬
as user name theName with password thePassword

	on error the error_message number the error_number
		display dialog ¬
			"Error: Failed to Connect to AntiVirus Server " & return & return & " Please contact IT Department. " buttons {"Cancel"}
	end try
	delay 5
	«event fndrptwy» disk theVolume -- Disconnect volume
end tell

end if

I found that Sophos updates differently in OS9 & OSX. In 9 you just need to mount the Sophos IDE’s and the client updates but in OSX you must mount the Sophos volume and then start Sophos to update the IDE’s. I haven’t developed the OSX script as Sophos had released a Panther compatible version and I’ve just left the company that I wrote the OS9 script for!! :slight_smile:

I was going to use Cronix to get the script at a set time.

Hope this helps.

Ben.

Thank you. I’ll have a look at it. I’ve been insanely busy. But I appreciate your help.

Agi

Thank you very much Ben - this will certainly be a time saver :slight_smile:

Sophos told me that they’re working on a version for OS X (expected release date: April) that will make the update automated.

Right now you have to manually open the program.

Agi