Jump to content

AutoIt + Group Policy


bbrian

Recommended Posts

I just wrote a script using AutoIt to install AVG 8.0 with all the settings I wanted. I then used WIWW to wrap it as an msi but when I tried deploying with group policy it just stalled. I assume this is because I'm using the WinWait function and no windows are being created. Is there a way I can interact with a Window that isn't there? I don't think handles/pids will work because I need to identify each screen by the text on it.

Link to comment
Share on other sites


I just wrote a script using AutoIt to install AVG 8.0 with all the settings I wanted. I then used WIWW to wrap it as an msi but when I tried deploying with group policy it just stalled. I assume this is because I'm using the WinWait function and no windows are being created. Is there a way I can interact with a Window that isn't there? I don't think handles/pids will work because I need to identify each screen by the text on it.

Try:

If WinExists("title", "text") Then

WinActivate("title", "text") or something

EndIf

Link to comment
Share on other sites

I'd say try to mail grisoft support about ways to install AVG unattended. I searched a german unattended switch DB and found something about AVG free and a setup.ini file. Maybe there is a way to get the settings into AVG setup without AutoIt.

Link to comment
Share on other sites

I've added in timeouts to my WinWait statements, I've a lot of this in my code now:

If WinWait("AVG 8.0", "Welcome", 45) Then ControlClick("AVG 8.0", "Welcome", 1000)

I've attached the script. It was working fine when I executed it in Windows normally but even with the timeouts it's not up to much as an assigned application. I used pskill to kill the process, which was the setup file launched by the AutoIt script.

I was on the phone to AVG twice yesterday, once for 45 minutes. They provide a network install wizard but it wasn't working, with no apparant reason. I have to send them log files, I though I could get this on quickly with AutoIt. The setup.ini sounds familiar but Google didn't find much about AVG 8.

There are errors in the attached file that have been introduced during my troubleshooting. I'll post up a more correct version soon.

avg8.au3

Edited by bbrian
Link to comment
Share on other sites

Could you please post that number to AVG. I'm wrestling with the same problem just not with AutoIt. I have been able to get the script to work on a computer without AVG 7.5 currently on it, but when I attempt a scripted install of AVG 8.0 AV Network Edition on a system with AVG 7.5 currently installed, it fubars :(. They haven't replied to my emails and I'm on a deadline. Thanks :)

Sincerely,

Joshua D.

A tired school system tech admin

Link to comment
Share on other sites

Could you please post that number to AVG. I'm wrestling with the same problem just not with AutoIt. I have been able to get the script to work on a computer without AVG 7.5 currently on it, but when I attempt a scripted install of AVG 8.0 AV Network Edition on a system with AVG 7.5 currently installed, it fubars :(. They haven't replied to my emails and I'm on a deadline. Thanks :)

Sincerely,

Joshua D.

A tired school system tech admin

I'm in Ireland and called +353 1 631 9359. I was put through to the UK office but I don't have their number

I figured out that when running scripts from inside the SciTE editor, I could get away with less specific window definitions, e.g.

WinWait("AVG", "Please review") 
ControlClick("AVG", "", 1000)

would work in the SciTE editor, but when compiled it needed to be:

WinWait("AVG", "Please review") 
ControlClick("AVG", "Please review", 1000)

I managed to get it going through group policy today, which worked fine without 7.5 and needed a manual uninstall/reinstall when 7.5 was there. I was wrapping with WIWW 0.2 and tried ticking the box to force a restart, the pc restarted but AVG still didn't work. I think maybe script the AVG uninstall in an msi with forced restart and then order the group policy objects so that has lower priority # to (runs before) the AVG 8 msi GPO. Is there a way for this to only deploy if the avg7 directory is present?

I won't have a chance to try this before next Wednesday, also a school admin but only 1 day/week in that school.

Link to comment
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.
×
×
  • Create New...