Jump to content

Avira Antivir addon for nLite script


Recommended Posts

Hello,

I have tried to make an unattended instal of Avira Antivir.

I have tested the script in windows several times and it works perfekt, but when i aply it to my unattended xp instalation, the script starts executing and then just stops and nothing happens for hours.

Thank you for your sugestions, here is my script:

P.s is there a thread where i can find already made scripts for automate program installs?

thnk you

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=antivir\svcpack\antivir.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

; THIS SCRIPT WILL AUTOMATE THE INSTALLATION OF Avira Antivirus
Run ("avira.exe")

;Welcome
WinWaitActive ("Avira AntiVir Personal - Free Antivirus", "Welcome to the setup")
Send ("!n")
; User Agreement window
WinWaitActive ("Avira AntiVir Personal - Free Antivirus", "End user license agreement")

send ("{+}")
send ("!n")

;for private use
WinWaitActive ("Avira AntiVir Personal - Free Antivirus", "for private and not for commercial purposes")
send ("{+}")
send ("!n")


; type of installation
WinWaitActive ("Avira AntiVir Personal - Free Antivirus", "Please select a setup type")
send ("!n")

;registration
WinWaitActive ("Avira AntiVir Personal - Free Antivirus", "subscribe to the Avira newsletter")
send ("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{SPACE}{ENTER}")

;Complete
WinWaitActive ("Avira AntiVir Personal - Free Antivirus", "Installation complete")
send ("{+}{ENTER}")


WinWaitActive ("Updater", "")
ControlClick("Updater", "", "Button1")
WinWaitActive ("Updater", "Close")
ControlClick("Updater", "", "Button1")

WinWaitActive ("Luke Filewalker", "&Stop")
ControlClick ("Luke Filewalker", "", "Button1")

WinWaitActive("Luke Filewalker", "Statistics")
ControlClick ("Luke Filewalker", "", "Button10")

WinWaitActive("Luke Filewalker", "")
ControlClick ("Luke Filewalker", "", "Button1")


;WinWaitActive ("Notifier of Avira AntiVir Personal - Free Antivirus", "")
;send ("{ENTER}")
Edited by Orao
Link to comment
Share on other sites

Hi and Welcome to the forums!

3 points here:

*Try to avoid Send() as much as possible, too much can go wrong. See if ControlSend() or ControlSetText() works instead.

*The only "waiting" function is those WinWaitActive(), that should be what is stopping the script. Double-check all values etc. Also, if you get rid of send() so you don't need the active window, use WinWait() instead.

*Add full path in Run() (and add working dir!)

P.s is there a thread where i can find already made scripts for automate program installs?

No thread, but you can do a search in Example Scripts forum

Edit: another point

Edited by AdmiralAlkex
Link to comment
Share on other sites

I have noticed another problem.

So when i test from out windows xp, everything runs Perfect.

But when it runs while windows instalnation then:

* i just see that the instalation of Antivir starts, but then there is no more GUI shown and nothing happens anymore

* i have setup that the instalation goes normal (without silent)

* The other aplications when they are installed i can always see the GUI and what is happening.

*So, can it be that the installation has started, but then something is stopping the Antivir to continue, so the next (GUI) window doesn't come up, and thats why the scrpit sotps (Freezes).

Link to comment
Share on other sites

You can give this page a try

http://www.msfn.org/board/topic/141102-avira-setup-creator-for-avira-antivir-personal-v9v10/

Otheriwse, try running your script via RunOnceEx and test in VM first

Can also add to beginning of your script, a way to exit your script if hang

HotKeySet("^!x", "MyExit"); ctrl + alt + x to exit if script hang

; your script goes here

Func MyExit()
    Exit 
EndFunc

Personally, I would rather use winwait rather than waitwaitactive because script will hang easily if window are not active especially during unattended setup situation.

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