+ Post New Thread
Results 1 to 4 of 4
Scripts Thread, Script to delay Trend Update in Coding and Web Development; We sometimes have 20 or so wireless laptops logging on all at the same time and it's quite slow when ...
  1. #1

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Script to delay Trend Update

    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.


    Code:
    ; 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

  2. #2
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118

    [Dev] Sophos version

    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.

    Code:
    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...
    Last edited by contink; 23rd October 2008 at 04:42 PM.

  3. #3

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    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 ?
    Last edited by mattx; 23rd October 2008 at 05:05 PM.

  4. #4

    Join Date
    Nov 2008
    Location
    Cape Wrath
    Posts
    32
    Thank Post
    0
    Thanked 4 Times in 4 Posts
    Rep Power
    17
    You can delay Sophos updating at login. It'll wait until the scheduled delay has expired (default five minutes which you can change centrally) and then it'll call ALUpdate.exe process. The link is...
    Sophos Anti-Virus for Windows 2000+: disabling updates on power-up

    Regards, PcDude
    Last edited by PcDude; 10th November 2008 at 09:00 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 18
    Last Post: 12th September 2013, 05:44 PM
  2. Replies: 5
    Last Post: 28th August 2008, 09:55 AM
  3. 1.7.4 will have Trend Sysclean
    By mattx in forum EduGeek Admin Bar
    Replies: 0
    Last Post: 24th June 2008, 03:39 PM
  4. SIMS update script
    By nicholab in forum MIS Systems
    Replies: 1
    Last Post: 27th April 2007, 08:17 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •