Jump to content

Automate installations


Recommended Posts

Hi Guys,

I'v been trying to create automatic installation for various applications most pf them are anti-viruses and anti spywares for testing purpose.

i use the following procedure:

1.manualy install documenting all of the interactions of mine with the installers.

2.recording installation and gathering window information with "AutoIT Window Info".

3.writing the script and running it once and than compile.

The results are not consist while i manage to install once the second time it is running is showing errors during the installation, please help me on this one :blink: .

this is the script i am using to install Avira Anti-Virus:

If WinExists(@ScriptName) Then Exit

AutoItWinSetTitle(@ScriptName)

AutoItSetOption("TrayIconDebug", 1)

AutoItSetOption("SendKeyDelay", 2000)

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

MsgBox(0,"test","run");

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

;inistial screen

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "")

ControlClick ($title, "Continue", "Button1")

;Welcome screen

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

ControlClick ($title, "&Next >", "Button1")

;send ("!n")\

WinWait("Avira AntiVir Personal - Free Antivirus", "");

;WinWaitActive("Avira AntiVir Personal - Free Antivirus", "")

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

;accept license agreement

;WinWaitActive("Avira AntiVir Personal - Free Antivirus", "")

WinActivate("Avira AntiVir Personal - Free Antivirus", "")

ControlClick ($title, "I &accept the terms of the license agreement", "Button1")

;Send("{SPACE}")

ControlClick ($title, "&Next >", "Button3")

;;optional regisration

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

WinActivate("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")

WinActivate("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, "&Next >", "Button5")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "")

ControlClick($title, "C&omplete", "Button1")

ControlClick($title, "&Next >", "Button8")

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "Yes, I would like to subscribe to the Avira newsletter")

ControlClick ($title, "", "Button2")

ControlClick ($title, "&Next >", "Button5")

;installation complete

WinWaitActive("Avira AntiVir Personal - Free Antivirus", "Installation complete")

WinActivate("Avira AntiVir Personal - Free Antivirus", "Installation complete")

;ControlClick ($title, "Finish", "Button12")

MsgBox(0,"Test","Finish",10000);

Thanks Guys ;)

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