Jump to content

Script Uninstall Automatically Avira Cannot Work!


Recommended Posts

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???

Link to comment
Share on other sites

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
Link to comment
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. :(

Link to comment
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....

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...