Jump to content

Recommended Posts

Posted

We sometimes have 20 or so wireless laptops logging on all at the same time and it's quite slow when Trend updates the pattern and also the engine.

I very much doubt other schools use Trend and if they do have similar problems, but if they do - this quick script may help.

You need to set the TMListen service to manual, [ stop it first ] and have this running as part of your logon script.

Also you need to change the LOCAL_ADMIN_PASSWORD to your local admin password for the PC / Laptop as you need admin rights to start the service.

 

When run it will delay the start of the tmlisten service between 5 to 20 mins - then it will start - any updates needed will then take place.

 

This speeds up the logon service for us quite a bit.

 

 

; AutoIt Version:  	3.2.8.1
; Language:        	English
; Platform:        	WinXP
; Author:          	Matt 
; Script Function: 	Delays TMLISTEN.EXE for a time between 5 and 20 mins
; Version:			1.1 Beta
; Date:				Sept 2008

;1.1 - added Random time element

Opt("TrayIconHide", 1)
DIM $time 
$time = Random(300000, 1200000, 1)
Sleep($time)
RunAsSet("administrator", @ComputerName, "LOCAL_ADMIN_PASSWORD")
Run(@ComSpec & ' /c net start tmlisten', '', @SW_HIDE)
RunAsSet()
Exit

  • 1 month later...
Posted (edited)

Having looked around it seems you can do this with Sophos too so I've come up with this batch file...

 

Tested locally but not as a startup script yet.

 

Echo Pausing Service Startup for 20 minutes
color 9f
@echo off

rem Checking service state
NET START | FIND "Sophos AutoUpdate Service" > nul
IF errorlevel 1 GOTO :s_not_running
IF errorlevel 0 GOTO :s_running

:s_running
Rem Stopping the service
NET STOP "Sophos AutoUpdate Service"

:s_not_running
Rem Pausing 10 minutes
COPY "\\server\[source]\SLEEP.EXE" c:\ /B
c:\SLEEP.exe 1200
DEL C:\SLEEP.EXE
NET START "Sophos AutoUpdate Service"

Exit

 

This checks for the service, shuts it down if it's already running... copies sleep.exe from somewhere (you'll need to edit the \\server\[source] bit, waits for as long as it needs and then deletes the sleep.exe from the local drive before restarting sophos autoupdate.

 

Feels safer than having a script which has the admin password in, hard coded...

Edited by contink
Posted (edited)
Feels safer than having a script which has the admin password in, hard coded...

 

I know my AutoIT scripts somtimes use XP's secondary logon service but they are compiled before use into .exes with a level of encryption.

It makes me sleep better at night.....;)

 

Just to add, I would like to think you can do the same with other AV products......This sort of thing should go in the wiki...

Just looking at the sophos script - GOTOs...... always reminds me of me knocking up badly written BASIC language stuff....always ended up with Spaghetti code - http://en.wikipedia.org/wiki/Spaghetti_code

 

 

I take it you don't need admin rights to shut the Sophos AutoUpdate Service ?

Edited by mattx
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...