PaulIA Posted September 6, 2006 Author Posted September 6, 2006 @mazin Thanks for the link to the other thread. Nice guide by the way and I would highly recommend anybody having trouble with SAV take a look at it. I may have missed it (haven't had my morning coffee yet ) but if I'm trying to create a CD that I don't have to update prior to using it, how do I get the most recent copy of the intelligent updater? Wouldn't it have a different name in 6 months and I'd have to run LiveUpdate to get my definitions up to date? That's what I was after with trying to get the vpdn_lu to work.Oh, and the C: tip, I did the same thing in my scripts . Editting now...
Vits Posted September 6, 2006 Posted September 6, 2006 @Mazin, err. updating script files @PaulIA, An interesting question that one. I am going to assume that you are deploying unmanaged clients as if it was a managed client, it would connect to the server, and get the last update that way. The reason i do the install, then the X86 Intelligent Updater is that sometimes the machines I create are not local to my desk or network, but connect back into my network over vpn (and we pay for data )Symantec provide a ftp point @ ftp://ftp.symantec.com/AVDEFS/norton_antivirus_corp/which has the last 3?-4? versions by date as well has by machine type.Im not a coder, but if someone has the skills to create a script to parse the file name, then select the newest file by date, and ftp that. Then ya away laughing. If someone does create this script, please post here as i'll certainly use it
PaulIA Posted September 7, 2006 Author Posted September 7, 2006 You mean something like this:; -------------------------------------------------------------------------------------------------;; AutoIt Version: 3.1.0; Author: PaulIA;; Script Function: Download latest Intelligent Updater from Symantec;; -------------------------------------------------------------------------------------------------; Initialize status messagesSplashTextOn("[Status]", "Initializing...", 500, 60, -1, @DesktopHeight/6, 1, "", 12, 600); As it turns out, Symantec has a file called md5-hash.txt on their web site that contains all of; the MD5 hash information for the files on their site. I could care less about the hash info, but; the file has a list of all of the files on the FTP site, which is what I'm after.gpDownload("md5-hash.txt", "md5-hash.txt"); Open hash file$File = FileOpen(@ScriptDir & "\md5-hash.txt", 0)if $File = -1 then MsgBox(16 + 4096, "Error", "Unable to open hash file") Exitendif; Parse hash file$FileName = ""$Last = ""while 1 $Line = FileReadLine($File) if @error = -1 then ExitLoop ; Check for comment if StringMid($Line, 1, 1) = "#" then ContinueLoop ; Strip MD5 hash value $N = StringInStr($Line, " ") if $N = 0 then ContinueLoop $Line = StringMid($Line, $N + 1) ; Make sure the file starts with the current year if StringMid($Line, 1, 4) <> @Year then ContinueLoop ; Make sure we're looking at the x86 installer if StringInStr($Line, "-x86.exe") = 0 then ContinueLoop ; Extract date and compare to Last $Date = StringMid($Line, 1, 12) if $Date < $Last then ContinueLoop $FileName = StringStripWS($Line, 3) $Last = $Datewend; Close hash fileFileClose($File); Failsafe checkif $FileName = "" then MsgBox(16 + 4096, "Error", "Unable to parse hash file") Exitendif; Get latest intelligent updater. You can change the second $FileName; to a constant value if you want to be able to use the same file name; in your UA script. I left the file name as it is on the FTP site for; testing purposes.gpDownload($FileName, $FileName); Hide status messagesSplashOff()Exit; -------------------------------------------------------------------------------------------------; gpDownload : Download a file from Symantec; -------------------------------------------------------------------------------------------------Func gpDownload($FTP, $Local) ; Build URL $URL = "ftp://ftp.symantec.com/AVDEFS/norton_antivirus_corp/" & $FTP ; Download file with feedback InetGet($URL, @ScriptDir & "\" & $Local, 1, 1) while @InetGetActive ControlSetText("[Status]", "", "Static1", @CR & "Downloading: " & @InetGetBytesRead) Sleep(250) wend if @InetGetBytesRead = -1 then MsgBox(16 + 4096, "Error", "Unable to download file from Symantec") Exit endifEndFuncEnjoy!
Vits Posted September 7, 2006 Posted September 7, 2006 @PaulAILooks for Waynes World Icon: Bowing, Not worthy, Not worthy Thanks
PaulIA Posted September 7, 2006 Author Posted September 7, 2006 Your welcome I may actually change my UA routine to use this as well. Wish I'd figured this out last week!
urie Posted September 7, 2006 Posted September 7, 2006 @PaulA, great script thanks , one question would it be possible to to add code to install the latest Intelligent Updater that it downloaded also, this is just an example im no good at autoit. RunWait ( @Comspec & ' /C \install\sav\20060903-016-x86.exe /q', '', @SW_HIDE )
PaulIA Posted September 7, 2006 Author Posted September 7, 2006 (edited) If you wanted to install the update right after you downloaded it, just modify the following section of code:; Get latest intelligent updater. You can change the second $FileName; to a constant value if you want to be able to use the same file name; in your UA script. I left the file name as it is on the FTP site for; testing purposes.gpDownload($FileName, $FileName); Install the updateRunWait(@ScriptDir & "\" & $FileName & " /q", @ScriptDir); Hide status messagesSplashOff()I haven't run this, so hopefully it's not buggy, but you get the general idea. You don't need to launch a command window to run the updater as it's an exe. You also probably don't want to hide the Symantec installer as it will look like the system is hung up while the installer is running.HTH Edited September 7, 2006 by PaulIA
urie Posted September 7, 2006 Posted September 7, 2006 If you wanted to install the update right after you downloaded it, just modify the following section of code:; Get latest intelligent updater. You can change the second $FileName; to a constant value if you want to be able to use the same file name; in your UA script. I left the file name as it is on the FTP site for; testing purposes.gpDownload($FileName, $FileName); Install the updateRunWait(@ScriptDir & "\" & $FileName & " /q", @ScriptDir); Hide status messagesSplashOff()I haven't run this, so hopefully it's not buggy, but you get the general idea. You don't need to launch a command window to run the updater as it's an exe. You also probably don't want to hide the Symantec installer as it will look like the system is hung up while the installer is running.HTH working Great Thanks,
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now