I am trying to automate (.exe file) the installation process of my product using autoit.
Everything works ok except the last before page.
When I hit next button on "ready to install" page, it goes to "installing" page (on this page it installs all the required files and it has no buttons / keys to sent to goto next page. This process takes about 3-4 minutes)
And then it automatically goes to "installation successful" page. On this page I have to hit "finish" button here to end up.
It stopped working at the "installing" page in the wizard.
Please find the code that I have been trying.
#requireadmin
Opt("WinTitleMatchMode", 2)
Opt("WinTextMatchMode", 2)
$Version = "1234"
$sScriptName = "Installation Automater"
$exe = "C:\Setup"&$Version&".exe"
$ProcessName = "Setup"&$Version&".exe"
$windowname = "Matrix Setup"
$delay = 1000
ShellExecuteWait($exe)
;It waits for the 'welcome' page of the wizard to popup and become active
WinWaitActive($windowname)
sleep(500)
Send("!n")
Sleep($delay)
;Sends a mouse click command to 'I Agree' radio box on the license agreement dialog
ControlClick($windowname, "I agree to the terms of this license agreement", 602, "", 1)
Sleep($delay)
Send("!n")
;It waits for the 'installation folder' page of the wizard to popup and become active
WinWaitActive($windowname)
Sleep($delay)
Send("!n")
;It waits for the 'shortcuts' page of the wizard to popup and become active
WinWaitActive($windowname)
Sleep($delay)
ControlClick($windowname, "Next >", 100, "", 1)
;It waits for the 'ready to install' page of the wizard to popup and become active
WinWaitActive($windowname)
Sleep($delay)
Send("!n")
;It waits for the "lnstalling' page of the wizard to popup and become active
WinWaitActive($windowname, "Installing Matrix")
Sleep(180000)
;It waits for the 'installation successful' page of the wizard to popup and become active
WinWaitActive($windowname, "Installation Successful")
Sleep($delay)
Send("!f")
Exit