Sign in to follow this  
Followers 0
darkzeus

Script Uninstall Automatically Avira Cannot Work!

7 posts in this topic

Dear All

I try to make script automatically for uninstall avira free edition...

here is the code ..

Run("C:\Program Files\Avira\AntiVir Desktop\setup.exe /remove","",@SW_MINIMIZE)

WinWait ("Setup of Avira Antivir Personal - Free Antivirus")
WinActive ("Setup of Avira Antivir Personal - Free Antivirus")
WinWaitActive ("Setup of Avira Antivir Personal - Free Antivirus")
Send ("!Y")


WinWait("Avira Antivir Personal - Free Antivirus", "Maintenance complete")
WinActive ("Avira Antivir Personal - Free Antivirus", "Maintenance complete")
WinWaitActive ("Avira Antivir Personal - Free Antivirus", "Maintenance complete")
Send ("!R")
Send ("{ENTER}")

; Close scan process
ProcessWait("avirafree.exe")
$PID = ProcessExists("avirafree.exe")
If $PID Then
        ProcessClose($PID)
EndIf

the uninstaller running...

but send key cannot work...

anyone help me???

Share this post


Link to post
Share on other sites



Have you tried ControlSend() , from waht i know should work better , or use ControlClick() to click the buttons.

Share this post


Link to post
Share on other sites

It may work better if you change WinActive to WinActivate.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

It may work better if you change WinActive to WinActivate.

i try to change this script...

#cs ----------------------------------------------------------------------------

 Author:         darkzeus
 
 Avira AntiVir PersonalEdition Classic 7.06.00.270

 Script Function:
        Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
; Run the installer

Run("C:\Program Files\Avira\AntiVir Desktop\setup.exe /remove","",@SW_MINIMIZE)

WinWait ("[#32770:Setup of Avira Antivir Personal - Free Antivirus]")
WinActive ("[#32770:Setup of Avira Antivir Personal - Free Antivirus]")
WinWaitActive ("[#32770:Setup of Avira Antivir Personal - Free Antivirus]")
Send ("!Y")
sleep (6000)
WinWait ("[#32770:Avira Antivir Personal - Free Antivirus]")
WinActive ("[#32770:Avira Antivir Personal - Free Antivirus]")
if WinWaitActive ("[#32770:Avira Antivir Personal - Free Antivirus]","","Button1") then 
ControlSend("[Button:Button1]", "", "1", "&Restart Computer")
ControlClick("[#32770:Avira Antivir Personal - Free Antivirus]","","Button1")
Send ("{ENTER}")
endif
; Close scan process
ProcessWait("avirafree.exe")
$PID = ProcessExists("avirafree.exe")
If $PID Then
        ProcessClose($PID)
    EndIf
    EXIT

:)

here's the code... its work!!!! :)

but i have a new problem...

ControlSend("[Button:Button1]", "", "1", "&Restart Computer")
ControlClick("[#32770:Avira Antivir Personal - Free Antivirus]","","Button1")
Send ("{ENTER}")

this code cannot sent key stroke...

sorry for my dump question.... :(

this my screenshoot program..

Posted Image

i try to change restart ---> no restart

when i send {ENTER} its not work...

any advice?????

Edited by darkzeus

Share this post


Link to post
Share on other sites

I got the 2 windows to work with this:

$title = 'Setup of Avira AntiVir Personal - Free Antivirus'
$text = 'Do you want to completely remove the selected application and all its components?'
WinWait($title, $text)
WinActivate($title, $text); likes active focus before click
WinWaitActive($title, $text)
ControlClick($title, $text, 'Button1'); &Yes

$title = 'Avira AntiVir Personal - Free Antivirus'
$text = 'Press Finish to end maintenance operations.'
WinWait($title, $text)
ControlCommand($title, $text, 'Button1', 'UnCheck'); &Restart computer
ControlClick($title, $text, 'Button4'); Finish

It is the latest version of Avira on their website if it matters. :(

Share this post


Link to post
Share on other sites

I got the 2 windows to work with this:

$title = 'Setup of Avira AntiVir Personal - Free Antivirus'
$text = 'Do you want to completely remove the selected application and all its components?'
WinWait($title, $text)
WinActivate($title, $text); likes active focus before click
WinWaitActive($title, $text)
ControlClick($title, $text, 'Button1'); &Yes

$title = 'Avira AntiVir Personal - Free Antivirus'
$text = 'Press Finish to end maintenance operations.'
WinWait($title, $text)
ControlCommand($title, $text, 'Button1', 'UnCheck'); &Restart computer
ControlClick($title, $text, 'Button4'); Finish

It is the latest version of Avira on their website if it matters. :(

wow thanks!!!

i'll try it....

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