MSFN Forum: Avira Antivirus 9 - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Avira Antivirus 9 AutoIt Don't works.. Rate Topic: -----

#1 User is offline   GeorgeVasil 

  • Group: Members
  • Posts: 5
  • Joined: 04-August 08

Posted 17 May 2009 - 01:03 PM

Hello guys..

I am trying to make a Silent install of the latest Avira Antivirus version.

I Follow this guide..posted here : http://www.itstuff.ca/2009/05/unattended-i...-antivirus.html

First of all I setup autoit v3 (AutoIt Full Installation) downloaded from here.. http://www.autoitscr...downloads.shtml

I copy the guide's plain view that looks like this :

If WinExists(@ScriptName) Then Exit

AutoItWinSetTitle(@ScriptName)
AutoItSetOption("TrayIconDebug", 1)
; AutoItSetOption("SendKeyDelay", 20)

global $title='Avira AntiVir Personal - Free Antivirus', $file='avira_antivir_personal_en.exe'

Run ( @ScriptDir&'\'&$file )

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "")
ControlClick ($title, "Continue", "Button1")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "This wizard will install Avira AntiVir Personal on your computer.")
send ("!n")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "")
ControlClick ($title, "&Next >", "Button2")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "Licence agreement Avira AntiVir Personal - Free AntiVirus")
send ("!a")
ControlClick ($title, "&Next >", "Button3")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "Please confirm that you will use the Avira AntiVir Personal - Free Antivirus only for private and not for commercial purposes.")
ControlClick ($title, "", "Button2")
ControlClick ($title, "&Next >", "Button5")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "Select the program features you want to install")
ControlClick ($title, "C&omplete", "Button1")
ControlClick ($title, "&Next >", "Button7")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "Yes, I would like to subscribe to the Avira newsletter")
ControlClick ($title, "", "Button2")
ControlClick ($title, "&Next >", "Button5")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "Installation complete")
ControlClick ($title, "Show readme.txt", "Button1")
ControlClick ($title, "Finish", "Button12")

Do
WinWait("Configuration wizard")
ControlClick("Configuration wizard", "", "Button2")

WinWaitActive("Configuration wizard", "")
ControlClick("Configuration wizard", "", "Button6")

WinWaitActive("Configuration wizard", "")
ControlClick("Configuration wizard", "", "Button8")

WinWaitActive("Configuration wizard", "")
ControlClick("Configuration wizard", "", "Button10")

WinWaitActive("Configuration wizard", "")
ControlClick("Configuration wizard", "", "Button1")

WinWaitActive("Configuration wizard", "")
ControlClick("Configuration wizard", "", "Button11")


WinWaitActive("Configuration wizard", "You have now specified the basic configuration of Avira AntiVir Personal - Free Antivirus")
ControlClick("Configuration wizard", "", "Button12")

Until 1=2


Then i open ''SciTE Script Editor'' and i paste the code inside it. I save & compile the file. The ''Autoit3Wrapper Window'' doesn't appear as shown at the guide.

Anyway,I've used the compiled exe file with WPI...the avira_antivir_personal_en gets unpacked but it stacked to the first ''next button''.

Any help is appreciated because i am not familiar with AutoIt..;?

This post has been edited by GeorgeVasil: 17 May 2009 - 01:04 PM



#2 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

  Posted 17 May 2009 - 08:37 PM

View PostGeorgeVasil, on May 18 2009, 05:03 AM, said:

Then i open ''SciTE Script Editor'' and i paste the code inside it. I save & compile the file. The ''Autoit3Wrapper Window'' doesn't appear as shown at the guide.

If you have the full Scite4AutoIt3 editor installed then selecting "Compile" (Ctrl+F7) will show the dialog else selecting "Build" (F7) will compile without prompt (as long as no errors are detected).

Quote

Anyway,I've used the compiled exe file with WPI...the avira_antivir_personal_en gets unpacked but it stacked to the first ''next button''.

Any help is appreciated because i am not familiar with AutoIt..;?

With some changes to the code you posted, the script worked for me.

Stopping at the 1st window may have been because the window did not activate. My changes to the code forces the window to activate.

The Do Untill loop is illogical as 1 will never equal 2 and no condition allows the exit of the loop so the loop will forever loop. i replaced the loop as I do not see a need for a loop with the code.

The code shows a lack of using the text parameters and I would advise the use of them to ensure the script operates with the correct window with each execution. I have not done the previous mention of text parameter changes so you can use some time to improve on this.

Posted script with changes made
 
#RequireAdmin

If WinExists(@ScriptName) Then Exit

AutoItWinSetTitle(@ScriptName)
AutoItSetOption("TrayIconDebug", 1)
; AutoItSetOption("SendKeyDelay", 20)

Global $title = 'Avira AntiVir Personal - Free Antivirus'
Global $file = 'avira_antivir_personal_en.exe'

; Use quoted double quotes to prevent issues with spaces in the path
$pid = Run('"' & @ScriptDir & '\' & $file & '"')
If @error Then Exit 1

; WinWait is usually adequate for Control* functions to operate correct
WinWait($title, "")
ControlClick($title, "Continue", "Button1")

WinWait($title, "This wizard will install Avira AntiVir Personal")
Send("!n")

WinWait($title, "")
ControlClick($title, "&Next >", "Button2")

; Ensure window is active for Send function to operate correct
_WinWaitActive($title, "Licence agreement Avira AntiVir Personal")
Send("!a")
ControlClick($title, "&Next >", "Button3")

WinWait($title, "Please confirm that you will use"); ...not for commercial use
ControlClick($title, "", "Button2")
ControlClick($title, "&Next >", "Button5")

WinWait($title, "Select the program features you want to install")
ControlClick($title, "C&omplete", "Button1")
ControlClick($title, "&Next >", "Button7")

WinWait($title, "Yes, I would like to subscribe to the Avira newsletter")
ControlClick($title, "", "Button2")
ControlClick($title, "&Next >", "Button5")

WinWait($title, "Installation complete")
ControlClick($title, "Show readme.txt", "Button1")
ControlClick($title, "Finish", "Button12")

; Wait for up to 60 seconds for config window
If WinWait("Configuration wizard", "", 60) Then
	ControlClick("Configuration wizard", "", "Button2")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button6")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button8")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button10")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button1")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button11")

	WinWait("Configuration wizard", "You have now specified the basic configuration")
	ControlClick("Configuration wizard", "", "Button12")
EndIf

; Wait up to 60 seconds for previous Run process to close
ProcessWaitClose($pid, 60)

Exit

Func _WinWaitActive($title, $text = '')
	; Window wait, activate and then wait until active
	WinWait($title, $text)
	WinActivate($title, $text)
	WinWaitActive($title, $text)
EndFunc
 


#3 User is offline   ZileXa 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 767
  • Joined: 27-May 04

Posted 18 May 2009 - 07:21 AM

Why don't you just use the already known method, see the topic about avira 8.. there is a switch :)

#4 User is offline   GeorgeVasil 

  • Group: Members
  • Posts: 5
  • Joined: 04-August 08

Posted 18 May 2009 - 10:54 AM

View PostMHz, on May 18 2009, 05:37 AM, said:

View PostGeorgeVasil, on May 18 2009, 05:03 AM, said:

Then i open ''SciTE Script Editor'' and i paste the code inside it. I save & compile the file. The ''Autoit3Wrapper Window'' doesn't appear as shown at the guide.

If you have the full Scite4AutoIt3 editor installed then selecting "Compile" (Ctrl+F7) will show the dialog else selecting "Build" (F7) will compile without prompt (as long as no errors are detected).

Quote

Anyway,I've used the compiled exe file with WPI...the avira_antivir_personal_en gets unpacked but it stacked to the first ''next button''.

Any help is appreciated because i am not familiar with AutoIt..;?

With some changes to the code you posted, the script worked for me.

Stopping at the 1st window may have been because the window did not activate. My changes to the code forces the window to activate.

The Do Untill loop is illogical as 1 will never equal 2 and no condition allows the exit of the loop so the loop will forever loop. i replaced the loop as I do not see a need for a loop with the code.

The code shows a lack of using the text parameters and I would advise the use of them to ensure the script operates with the correct window with each execution. I have not done the previous mention of text parameter changes so you can use some time to improve on this.

Posted script with changes made
 
#RequireAdmin

If WinExists(@ScriptName) Then Exit

AutoItWinSetTitle(@ScriptName)
AutoItSetOption("TrayIconDebug", 1)
; AutoItSetOption("SendKeyDelay", 20)

Global $title = 'Avira AntiVir Personal - Free Antivirus'
Global $file = 'avira_antivir_personal_en.exe'

; Use quoted double quotes to prevent issues with spaces in the path
$pid = Run('"' & @ScriptDir & '\' & $file & '"')
If @error Then Exit 1

; WinWait is usually adequate for Control* functions to operate correct
WinWait($title, "")
ControlClick($title, "Continue", "Button1")

WinWait($title, "This wizard will install Avira AntiVir Personal")
Send("!n")

WinWait($title, "")
ControlClick($title, "&Next >", "Button2")

; Ensure window is active for Send function to operate correct
_WinWaitActive($title, "Licence agreement Avira AntiVir Personal")
Send("!a")
ControlClick($title, "&Next >", "Button3")

WinWait($title, "Please confirm that you will use"); ...not for commercial use
ControlClick($title, "", "Button2")
ControlClick($title, "&Next >", "Button5")

WinWait($title, "Select the program features you want to install")
ControlClick($title, "C&omplete", "Button1")
ControlClick($title, "&Next >", "Button7")

WinWait($title, "Yes, I would like to subscribe to the Avira newsletter")
ControlClick($title, "", "Button2")
ControlClick($title, "&Next >", "Button5")

WinWait($title, "Installation complete")
ControlClick($title, "Show readme.txt", "Button1")
ControlClick($title, "Finish", "Button12")

; Wait for up to 60 seconds for config window
If WinWait("Configuration wizard", "", 60) Then
	ControlClick("Configuration wizard", "", "Button2")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button6")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button8")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button10")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button1")

	WinWait("Configuration wizard", "")
	ControlClick("Configuration wizard", "", "Button11")

	WinWait("Configuration wizard", "You have now specified the basic configuration")
	ControlClick("Configuration wizard", "", "Button12")
EndIf

; Wait up to 60 seconds for previous Run process to close
ProcessWaitClose($pid, 60)

Exit

Func _WinWaitActive($title, $text = '')
	; Window wait, activate and then wait until active
	WinWait($title, $text)
	WinActivate($title, $text)
	WinWaitActive($title, $text)
EndFunc
 



Thanks for your time!

I think i have found where the problem is:

Both avira scripts (the one i have posted and yours)..work on Windows 7 EN x64 and Vista SP1 EN x32 but NOT to my XP SP3 GR (x32) (@!~#~!#@~#)

Does it matter that the ''next'' or cancel buttons are transated to Greek?

Any tip to force the installer to use EN language?


View PostZileXa, on May 18 2009, 04:21 PM, said:

Why don't you just use the already known method, see the topic about avira 8.. there is a switch :)


Link me please ?

In which one of this threads switch is located at?

http://www.msfn.org/board/index.php?showto...mp;#entry734770

http://www.msfn.org/board/Avira-Antivir-8-...ed-t116123.html (this needs internet connection)?

I'll try this one when i have free time:

http://www.msfn.org/board/index.php?s=&...st&p=699852 :P edit <-- worked fine

This post has been edited by GeorgeVasil: 18 May 2009 - 11:11 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy