Jump to content

Script Stops Half Way Through Install


chrismo16

Recommended Posts

I am trying to create a script that will install Filemaker Pro 8.5 Advanced during my unattended XP install.

All goes well until it gets to the window that asks if I want to do a complete or custom install. This window is no different then any of the previous windows with one exception. Between the previous page and this one you can see another window/process run really fact and disappear. How can I get around this?

Here is my script. The red entry is where I am stuck. Thanks for any help you can offer.

Run("setup.exe")

WinWaitActive("Choose Setup Language")

Send("{ENTER}")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup")

Sleep(5000)

ControlClick("FileMaker Pro 8.5 Advanced Setup", "Welcome to the InstallShield Wizard for FileMaker Pro 8.5 Advanced", "&Next >")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup", "Customer Information")

Send("Admin")

Send("{TAB}")

Send("{TAB}")

Send("36F34")

Send("69C76")

Send("E4934")

Send("8BF70")

Send("0A54A")

Send("8FDD3")

Send("A6C11")

ControlClick ("FileMaker Pro 8.5 Advanced Setup", "Customer Information", "&Next >")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup", "License Agreement")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "License Agreement", "I &accept the terms in the license agreement")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "License Agreement", "&Next >")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup", "Destination Folder")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "Destination Folder", "&Next >")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup", "Application Shortcuts")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "Application Shortcuts", "&Next >")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup", "Setup Type")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "Setup Type", "&Next >")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup", "Ready to Install the Program")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "Ready to Install the Program", "&Install")

WinWaitActive("FileMaker Pro 8.5 Advanced Setup", "InstallShield Wizard Completed")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "InstallShield Wizard Completed", "&Finish")

WinWaitActive("FileMaker Product Registration")

ControlClick("FileMaker Pro 8.5 Advanced Setup", "", "&Cancel")

WinWaitActive("Registration is not completed")

ControlClick("Registration is not completed", "", "&Yes")

Edited by chrismo16
Link to comment
Share on other sites


...

All goes well until it gets to the window that asks if I want to do a complete or custom install. This window is no different then any of the previous windows with one exception. Between the previous page and this one you can see another window/process run really fact and disappear. How can I get around this?

...

The window that appears briefly is probably stealing focus from your waiting window and since you make no attempt to activate the window then your script may stall in waiting for the window to activate. You do not seem to require the window to be active as you are using ControlClick() only so you may just use WinWait() instead of WinWaitAcitive(). If you want to use WinWaitActive() in an unattended install script then I would advise to force activation of the windows to prevent your script from stalling.

Comments added to code


$pid = Run("setup.exe")
; check error if setup.exe fails
If Not $pid And @error Then
Exit 1
EndIf

; use a user defined function to wait, activate and then wait until active with the window
_WinWaitActive("Choose Setup Language")
Send("{ENTER}")

$title = "FileMaker Pro 8.5 Advanced Setup"
_WinWaitActive($title)
Sleep(5000)
ControlClick($title, "Welcome to the InstallShield Wizard for FileMaker Pro 8.5 Advanced", "&Next >")

_WinWaitActive($title, "Customer Information")
Send("Admin")
Send("{TAB 2}")
Send("36F34" & "69C76" & "E4934" & "8BF70" & "0A54A" & "8FDD3" & "A6C11")
ControlClick ($title, "Customer Information", "&Next >")

; using WinWait with Control* functions as is normally sufficient
WinWait($title, "License Agreement")
ControlClick($title, "License Agreement", "I &accept the terms in the license agreement")
ControlClick($title, "License Agreement", "&Next >")

WinWait($title, "Destination Folder")
ControlClick($title, "Destination Folder", "&Next >")

WinWait($title, "Application Shortcuts")
ControlClick($title, "Application Shortcuts", "&Next >")

WinWait($title, "Setup Type")
ControlClick($title, "Setup Type", "&Next >")

WinWait($title, "Ready to Install the Program")
ControlClick($title, "Ready to Install the Program", "&Install")

WinWait($title, "InstallShield Wizard Completed")
ControlClick($title, "InstallShield Wizard Completed", "&Finish")

; title correction as you may have made an error as titles were different
WinWait("FileMaker Product Registration")
ControlClick("FileMaker Product Registration", "", "&Cancel")

WinWait("Registration is not completed")
ControlClick("Registration is not completed", "", "&Yes")

; a process may take a moment to finish after the last window so added a wait
ProcessWaitClose($pid, 10)

Exit

Func _WinWaitActive($title, $text = "")
; UDF to wait, activate and wait until active
WinWait($title, $text)
Sleep(250)
WinActivate($title, $text)
WinWaitActive($title, $text)
EndFunc

Func OnAutoItStart()
; 1 script instance only
If WinExists(@ScriptName & '_Interpreter') Then Exit
AutoItWinSetTitle(@ScriptName & '_Interpreter')
EndFunc

I replaced the common title string with the variable $title to account for the repetition.

:)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...