After downloading the vbs file, place it on your SUS server (I usually use c:\)
You have the option of using Jmail or the windows CDOnts mail components, by default it uses JMail since I find this more reliable and you have to install Jmail (free from www.dimac.net) on your sus server.
Set the script options:
Open autoapproveupdates.vbs in notepad and edit the setup section which looks like this:
''Use default C on local machine
strSUSpath = "C:"
You will usually not have to change the SUSPath unless you have installed InetPub on a different Drive (it does not matter where the updates are stored)
''Uncomment the line below and insert your server name if you want to run remotely
''strSUSpath = "\\Installsvr\c$"
It is possible to run the script on a machine other than the SUS server, just set the path here to the drive where the InenetPub directory is and later make sure the scheduled task user has privilages.
'' If true will not approve XP SP2
nosp2 = false
Change this to nosp2 = true to not approve XP SP2 automatically (New for 0.5)
'' If true will not approve Windows Server 2003 Service Pack 1
noWS03SP1 = false
Change this to noWS03SP1 = true to not approve Windows Server 2003 Service Pack 1 automatically (New for 0.6)
'' If false will use CDonts
usejmail = true
Change this to usejmail = false to use CDonts instead of JMail
'' Email configuration
EmailDstName = "admin@company.com"
EmailReplyToName = "sus@company.com"
EmailSrvName = "smtp.company.com"
change the email fields with relevent addresses for your organisation
Set the scheduled task:
Then set up a scheduled task on the server (control panel>scheduled tasks), right click and select add new task (rather than using the wizard) give it a sensible name such as "Approve SUS Updates" then edit the task.
Set the run box to the command line: "cscript c:\autoapproveupdates.vbs"
Leave the "start in" folder blank, but set the run as account to an account that has write access to the SUS files and the password is unlikely to change, you could set up a service account just for this purpose if you wanted or use the local administrator account.
Set the schedule to run say an hour or two depending on your connection speed after your SUS server is set to download updates.
Just to make sure the script should run ok, open a command prompt and then type "cscript c:\autoapproveupdates.vbs", and check for any error messages, if you see any the schedule will probably not work either, just check paths and permissions, these are the most likely causes of errors. |