This is a old script i wrote back in 2002 to automatically update F-Prot antivirus in a lab environment.
'OBSOLETE they finally have a update program.
'Here for example
'****************************************************************
'* Command Com Autoupdate 2k2 Script *
'* *
'* *
'* Its written in vbscript http://msdn.microsoft.com *
'* *
'* Stephen Cattaneo @2k2 *
'* Edited by: *
'* *
'****************************************************************
On error resume next
'Over all notes
'Remeber to give full register rights to the bellow registry keys,
'In the policy allow to run Windows installer patches w/ elevated permissions
Dim WshShell, date, currdate, latestdate
Set WshShell = WScript.CreateObject("WScript.Shell")
'Set to name of current deff file.
update="\latest.msp"
'Location of update directory
location="\\island\dfs\antivirus"
'Get version info
deffversion()
'Set update location
WshShell.RegWrite "HKCR\Installer\Products\C02C1A9B2ADAA1C47BD127BE4F886559\SourceList\LastUsedSource", "n;1;" & location, "REG_EXPAND_SZ"
WshShell.RegWrite "HKCR\Installer\Products\C02C1A9B2ADAA1C47BD127BE4F886559\SourceList\Net\1", location, "REG_EXPAND_SZ"
if currdate < latestdate then wshshell.run(location & update & " /q")
Function deffversion()
Dim fso, c, n
Set fso = CreateObject("Scripting.FileSystemObject")
Set c = fso.GetFile("C:\Program Files\Common Files\Command Software Shared\Scanner\sign.def")
Set n = fso.GetFile(location & update)
currdate = c.DateLastModified
latestdate = n.DateLastModified
End Function