Sign in to follow this  
Followers 0
am632

avg 9 auto installer freezes

5 posts in this topic

Hi, I have made an auto installer for avg 9 but when it gets to the end to configure it, it stops, then if you manually click next it will then continue the script.

heres the code

#NoTrayIcon
;AVG Setup ------------------------------

Run("avg9.exe")
;welcome to avg setup
WinWaitActive("AVG Free 9.0 build 707 (11/11/2009)", "&Next >")
Send("{ENTER}")
;lic agreement
WinWaitActive("AVG Free 9.0 build 707 (11/11/2009)", "&Accept")
Send("!l")
Send("!a")

;checks system at this point
;std install
WinWaitActive("AVG Free 9.0 build 707 (11/11/2009)", "&Next >")
Send("!n")

;activate
WinWaitActive("AVG Free 9.0 build 707 (11/11/2009)", "&Next >")
Send("!n")

;no toolbar
WinWaitActive("AVG Free 9.0 build 707 (11/11/2009)", "&Next >")
Send("{TAB}")
Send("{TAB}")
Send("{SPACE}")
Send("!n")

;installing

;AVG setup finished ----------------------

;AVG Config ------------------------------
;updates

;config
WinWaitActive("AVG First Run Wizard", "&Finish >") ;SCRIPT FREEZES ON THIS SECTION NO MATTER WHAT I TYPE
Send("!TAB")
Send("!TAB")
Send("{ENTER}")

;optimize scanning
WinWaitActive("AVG Optimization Scan", "Optimize scanning now (recommended)") ;SCRIPT CONTINUES ON THIS SECTION WHEN PREVIOUS SCREEN IS MANUALLY CLICKED NEXT
Send("{DOWN}")
Send("{ENTER}")

Please can anyone help fix the problem?

Thanks

Share this post


Link to post
Share on other sites



Maybe the setup does not activate the window ?

instead of

WinWaitActive("AVG First Run Wizard", "&Finish >")

try

Do
   WinActivate("AVG First Run Wizard", "&Finish >")
Until WinActive("AVG First Run Wizard", "&Finish >")

hth,

whim

Share this post


Link to post
Share on other sites

I would also suggest using controlsend() instead of send() to make your script more robust.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Had the same problem here installing the Network Edition. Seems OK now. Have only tested once. It's late here.

Here's the part where the First Run Wizard starts:

ProcessWait("avgfrw.exe", 600)

If $RunFirstRunWizard = 0 Then
    ProcessClose("avgfrw.exe")

ElseIf WinWaitActive("AVG First Run Wizard", "AVG Update", 60) Then
        
            If $LogProgress = 1 Then FileWriteLine($ProgressLog, "AVG Update")
        

        WinWaitClose("AVG First Run Wizard", "AVG Update")
    
        If WinWait("AVG First Run Wizard", "Schedule regular scans and updates", 5) Then

...

I've attached my complete script. I've made one or two changes since I ran it last and I haven't tested everything yet. e.g. I don't think adding languages works yet and setting the time of the scheduled scan doesn't.

I'm going to wrap it with WIWW and deploy it in Group Policy. There's a utility, avgremover.exe, which I'm going to run in a separate GPO to uninstall previous versions and then use a WMI filter to check the uninstall program has run before installing with the main script. avgremover.exe needs an autoit script to click yes at one point; it should also be put in the uninstall section of the WIWW MSI.

I'm using the unpacked setup files to save a bit of time at the beginning. It should be easy to change my script to work with the free version -- there weren't too many differences between the AVG 8 clicks and 9.

Edited by BBrian

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Here's an updated script for AVG 9.0 Network Edition (i.e. paid) that is deploying successfully with Group Policy. I've been running on the extracted setup file. You need to install the Visual C++ Redistributable separately, first. Put it in a different GPO and then put this WMI filter on the AVG GPO:

Select * from Win32_Product Where (Caption Like "%Microsoft Visual C++ 2005%")

This will fail if AVG is already installed. It will probably fail if you change the components to be installed, but will be pretty easy to add code for anything I missed. I have it logging each window it sees, so if it gets stuck just check the log. Kill msiexec it with sysinternals' pstools/pskill.

I'd appreciate comments on the code as this is the biggest script I've written.

avg90.au3

Edited by BBrian

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
Sign in to follow this  
Followers 0