Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



smahdi

AVG Free Edition

Recommended Posts

smahdi    0

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

Share this post


Link to post
Share on other sites

kof94    0
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 :rolleyes: .

Edited by kof94

Share this post


Link to post
Share on other sites
ZileXa    2

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!

Share this post


Link to post
Share on other sites
blinkdt    0

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 Free
RunWait(@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 scans
Run( @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 Free
Update()
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)
WEnd


Func 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
EndIf
EndFunc
;--------------------------------------
Func KillUpdate()
If ProcessExists("wuauclt.exe") Then
Run("net stop wuauserv", "", @SW_HIDE)
EndIf
EndFunc

Share this post


Link to post
Share on other sites
kof94    0
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 by kof94

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×