AVG installer for mac

HI All
I hope you can help i’m trying write an uninstaller script which uses the built in mac uninstaller in AVG Antivirus (free version for mac)…

I have the bash to open the app
open -a /Applications/AVGAntivirus.app/Contents/Backend/utils/com.avg.uninstall.app

but i cant get bash/nor AppleScript to select the uninstall button when prompted.

Has anyone managed or know how i can get this to function correctly. Ideally id like a silent uninstall but cant seem to get the uninstall.sh to run with out user interaction.

Thanks Rob

OK have this working now:

activate application “/Applications/AVGAntivirus.app/Contents/Backend/utils/com.avg.uninstall.app”

tell application “System Events”

key code 36

end tell

set appPass to “YourPassword” as text
set username to “YourAdmin” as text

tell application “System Events”
delay 0.5
repeat until exists process “SecurityAgent”
delay 0.5
end repeat
tell process “SecurityAgent”
set value of text field 1 of window 1 to username
delay 0.5
keystroke appPass
key code 36
delay 10
key code 36
end tell
end tell

Thanks rob