Jump to content

Installation successful page in a wizard doesn't get activate after instalation takes place


Mamatha
 Share

Recommended Posts

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

Link to comment
Share on other sites

I don't see how it works at all because you start off with ShellExecuteWait(), pausing the script until the process finishes. That would prevent all the window handling after it.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • 4 weeks later...
  • Moderators

Hi, Mamatha. Rather than using WinWait and mouseclicks, have you looked into whether the product supports some mode of silent installation from the command line? This is often much easier than trying to script your way through the various windows. If you browse to the location of the executable from the command line and type in "exe name" /? does it return anything?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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

×
×
  • Create New...