03 May 2009

Unattended Installation Avira Antivirus on Windows 7

Everybody knows that I'm real fun of Unattended Installation. I try to do as much as possible to automate everything :). Time to time, I meet applications are not supporting unattended or silent installation. In this situation, my "Best Friend" is Autoit helps me. In the following video, you can see a demo, how by using Autoit script (BTW, any Autoit script could be compiled into .EXE file) I'm installing Avira Antivirus on Windows 7 RC1 (Win7 RC1).


Note: To see a content of the demonstrated script click on "Read more" link.


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




Follow ITstuff.ca on Twitter

If you enjoyed this post consider subscribing via rssrectangle ITStuff.ca | Tips and Tricks for IT Staff or ITStuff.ca | Tips and Tricks for IT Staff Email


Bookmark and Share ITStuff.ca

7 comments:

  1. Ok, but you could make it more robust in case another screen tries to take focus during the install. For every call of WinWaitActive("title") you should rewrite it to
    Winwait("title")
    If Not WinActive("title") Then WinActivate("tle")
    WinWaitActive("title")

    Only use ("title", "visible text") for cases where screens are identical in title from one to next.

    Other than that I believe you could make this install invisible and still be successful. When using the Run command be sure to use it like this:
    Run("Program", "Working Dir", @SW_HIDE)
    This way the windows can be still interacted with using AutoIt, but not visible to the user. Go a step further to make it invisible by using the #NoTrayIcon directive so nothing shows up in the task bar.

    ReplyDelete
  2. The Internet- - because it could present a radical new universe of accommodations for everybody who utilizes it, has additionally impelled the making of many noxious online dangers; one of them being infections. mcafee antivirus program for business

    ReplyDelete
  3. Before running any tidy up program, ensure you have a present information reinforcement. best antivirus 2018

    ReplyDelete
  4. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. Webroot Install

    ReplyDelete
  5. In the event that you don't have any antivirus software right now introduced on your PC and you have been surfing the web,similar webpage

    ReplyDelete
  6. With regards to identification and cancellation of all current malware and for in general elite and convenience, Kaspersky Internet Security 2010 has been given the most elevated scores. Windows USA

    ReplyDelete
  7. here are such a large number of computer antivirus programming items accessible today that occasionally it is difficult to realize where to begin. computer problems

    ReplyDelete