smahdi Posted May 30, 2007 Share Posted May 30, 2007 Hi,Would it be possible for someone to write a script to download and completely install AVG Free Edition? I am using AutoIt.Thank You,Miya Link to comment Share on other sites More sharing options...
benners Posted May 31, 2007 Share Posted May 31, 2007 I have wrote and tried this and it works at present, if the URLs change it will need to be updated. It may help you with yours.avg.au3 Link to comment Share on other sites More sharing options...
eirogge Posted May 31, 2007 Share Posted May 31, 2007 Why don't you want to use the silent switches available for it? Link to comment Share on other sites More sharing options...
kof94 Posted June 1, 2007 Share Posted June 1, 2007 (edited) Why don't you want to use the silent switches available for it?If you actually check out benners script you'll realise it does use silent switches to install.I imagine the main reason you'd want a script like this is so your not breaking the freeware license by distributing the installer!It would be a bit extravagant to create it just so you could have the latest ver, although I could be wrong . Edited June 1, 2007 by kof94 Link to comment Share on other sites More sharing options...
ZileXa Posted June 3, 2007 Share Posted June 3, 2007 kof94 what do you mean?If you simply use switches, what does that have to do with an installer? Are you talking about creating an installer?Simply let the original installer run with the switch.. done! Link to comment Share on other sites More sharing options...
blinkdt Posted June 3, 2007 Share Posted June 3, 2007 OK, this is what I'm currently using. The script installs AVG Free, disables the daily scan feature, updates the program completely, and selects "Internet" as the update source. Balloon tip and custom icon are optional, modify to your liking:#include <AU3includes\Misc.au3>#include <AU3includes\Constants.au3>AutoItSetOption("WinTitleMatchMode", 4);--------------------------------------AdlibEnable ("KillUpdate")Opt('TrayMenuMode',1)TraySetToolTip(' Unattended installation is active . . . ')TraySetIcon( @ScriptDir & '\icon.ico')TraySetState (4);**********************************************************TrayTip('Unattended Installation', 'Installing AVG Free 7.5.467 . . . please wait . . .', 0, 1);-----install AVG FreeRunWait(@ScriptDir & '\avg75free_467a1008.exe /HIDE /DONT_START_APPS /NO_WELCOME /NO_AVGW_STARTUP /QUIT_IF_INSTALLED')FileDelete(@DesktopCommonDir & '\AVG*.lnk')FileCreateShortcut(@ProgramFilesDir & '\Grisoft\AVG7\avgw.exe', @ProgramsCommonDir & '\Accessories\System Tools\AVG Test Center.lnk')DirRemove(@ProgramsCommonDir & '\AVG 7.5', 1)Sleep(2000);-----disable daily scansRun( @ProgramFilesDir & '\Grisoft\AVG7\avgw.exe')WinWaitActive('AVG Free Edition - Test Center', '')ControlClick('AVG Free Edition - Test Center', '', 'Button4')Send("{UP}")Send("!e")WinWaitActive('Schedule Daily Test', '')Send("!p")ControlClick('Schedule Daily Test', '', 'Button9')WinClose('AVG Free Edition - Test Center');-----update AVG FreeUpdate()While 1 If WinExists('AVG Free Edition Update Selection', 'Please select update') Then ControlClick('AVG Free Edition Update Selection', 'Please select update', 'Button2') ElseIf WinExists ('AVG Free Edition', 'Update was successfully finished') Then ControlClick('AVG Free Edition', 'Update was successfully finished', 'Button1') Update() Else If WinExists('Update AVG', 'An error occurred when trying to connect') Then ControlClick('Update AVG', 'An error occurred when trying to connect', 'Button1') ElseIf WinExists('AVG Update', 'Your AVG program already has the latest updates installed') Then ControlClick('AVG Update', 'Your AVG program already has the latest updates installed', 'Button1') Sleep(3000) ;-----select 'Internet' as update source and do not ask again Run( @ProgramFilesDir & '\Grisoft\AVG7\avgcc.exe') WinWaitActive('AVG Free Edition - Control Center', '') ControlClick ('AVG Free Edition - Control Center','','Button3') WinWaitActive('Update', '') ControlClick ('Update','','Button4') ControlClick ('Update','','Button1') WinWaitActive('AVG Update', 'Your AVG program already has the latest updates installed') ControlClick('AVG Update', 'Your AVG program already has the latest updates installed', 'Button1') Sleep(500) WinClose('AVG Free Edition - Control Center','') TrayTip("clear tip","",0) For $i = 5 To 1 Step -1 TrayTip('Unattended Installation', "AVG installation will finish in " & $i & " seconds...", 0, 1) Sleep(1000) AdlibDisable() Next TrayTip("clear tip","",0) TraySetState (8) Exit EndIf EndIf Sleep(40)WEndFunc Update() $var = Ping('guru.grisoft.com') If $var Then Run(@Programfilesdir & '\Grisoft\AVG7\avginet.exe') Else TrayTip("clear tip","",0) For $i = 5 To 1 Step -1 TrayTip('Unattended Installation', "AVG installation will finish in " & $i & " seconds...", 0, 1) Sleep(1000) AdlibDisable() Next TrayTip("clear tip","",0) TraySetState (8) Exit EndIfEndFunc;--------------------------------------Func KillUpdate() If ProcessExists("wuauclt.exe") Then Run("net stop wuauserv", "", @SW_HIDE) EndIfEndFunc Link to comment Share on other sites More sharing options...
kof94 Posted June 3, 2007 Share Posted June 3, 2007 (edited) kof94 what do you mean?If you simply use switches, what does that have to do with an installer? Are you talking about creating an installer?Simply let the original installer run with the switch.. done!What I mean is...You would be breaking the freeware lic to distribute the installer as part of a package (it makes more sense if you read it)!But... you wouldn't (theoretically) be breaking the lic if your clients downloaded the installer directly from the Grisoft site and then installed the program. However, your client would still have to be using the program for personal use.benner's script does exactly that... downloads the installer and runs a silent installation!Does that make better sense?Personally speaking, I'm not bothered but it's a good idea. Edited June 3, 2007 by kof94 Link to comment Share on other sites More sharing options...
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