am632 Posted November 26, 2009 Share Posted November 26, 2009 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 expandcollapse popup#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 Link to comment Share on other sites More sharing options...
whim Posted November 26, 2009 Share Posted November 26, 2009 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 Link to comment Share on other sites More sharing options...
dantay9 Posted November 26, 2009 Share Posted November 26, 2009 I would also suggest using controlsend() instead of send() to make your script more robust. Link to comment Share on other sites More sharing options...
BBrian Posted December 7, 2009 Share Posted December 7, 2009 (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 December 8, 2009 by BBrian Link to comment Share on other sites More sharing options...
BBrian Posted December 9, 2009 Share Posted December 9, 2009 (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 December 9, 2009 by BBrian 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