Sign in to follow this  
Followers 0
capnmaximus

Script stops before installation completes...

7 posts in this topic

#1 ·  Posted (edited)

Hello gentlemen,

I just got started with AutoIt so please forgive me if this is a dumb question. My background is more of DOS batch scripting but it has some limitations.

Basically, the purpose of this script is to install Roxio.

Everything works fine up until the point where the installation begins. It is at this point where the installer takes a while before it gets to the next screen where it says the installation finished successfully. The script acts as thought it times out waiting for the next screen to show up.

WinWaitActive("Roxio Creator Starter Setup","Click Install to beg")

Send("!I")

Is there a command besides "WinWaitActive" to tell the script to wait for the next screen? Not sure if "SLeep" would work.

Here's a copy of the script... and I thank you for your time.

; Run Roxio installer

Run('C:TempRoxio12setup.exe')

WinWaitActive("Roxio Creator Starter Setup","Welcome to the Setup")

Send("!N")

WinWaitActive("Roxio Creator Starter Setup","I &accept the terms ")

Send("!A")

Send("!N")

WinWaitActive("Roxio Creator Starter Setup","&I will participate ")

Send("!N")

WinWaitActive("Roxio Creator Starter Setup","&Enter the install l")

Send("!N")

WinWaitActive("Roxio Creator Starter Setup","Click Install to beg")

Send("!I")

WinWaitActive("Roxio Creator Starter Setup","Setup Wizard Complet")

Send("!F")

WinWaitActive("Roxio Creator Starter","You must restart you")

Send("!N")

$SF_1 = "setup.exe"

If WinExists ( $SF_1 ) Then Exit

AutoItWinSetTitle ( $SF_1)

Roxio.au3

Edited by capnmaximus

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi, capnmaximus, welcome to the forum. Is there a reason you aren't doing the silent install for Roxio? It would be a lot easier than using Send. I know there is a support page on the Roxio website for silent install switches. Something like this looks like it would work:

RunWait('"C:\Temp\Roxio12\setup.exe" /qn RX_EULA_ACCEPTED=1')
Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi capnmaximus and welcome to Autoit forums.

Normally winwaitactive just waits for active window but you need to activate this window first even though your setup will probably auto-activate it, its not a bad thing to do just to be sure. Also i would wait that the window first is created before activating it and all together do something like this

; Run Roxio installer
$SF_1 = "setup.exe"
AutoItWinSetTitle ( $SF_1)
Run('C:\Temp\Roxio12\setup.exe')
WinWait("Roxio Creator Starter Setup", "Welcome to the Setup")
WinActivate("Roxio Creator Starter Setup", "Welcome to the Setup")
WinWaitActive("Roxio Creator Starter Setup","Welcome to the Setup")
Send("!N")
WinWait("Roxio Creator Starter Setup", "I &accept the terms")
WinActivate("Roxio Creator Starter Setup", "I &accept the terms")
WinWaitActive("Roxio Creator Starter Setup","I &accept the terms ")
Send("!A")
Send("!N")
WinWait("Roxio Creator Starter Setup", "&I will participate ")
WinActivate("Roxio Creator Starter Setup", "&I will participate ")
WinWaitActive("Roxio Creator Starter Setup","&I will participate ")
Send("!N")

WinWait("Roxio Creator Starter Setup", "&Enter the install l")
WinActivate("Roxio Creator Starter Setup", "&Enter the install l")
WinWaitActive("Roxio Creator Starter Setup","&Enter the install l")
Send("!N")
WinWait("Roxio Creator Starter Setup", "Click Install to beg")
WinActivate("Roxio Creator Starter Setup", "Click Install to beg")
WinWaitActive("Roxio Creator Starter Setup","Click Install to beg")
Send("!I")
WinWait("Roxio Creator Starter Setup", "Setup Wizard Complet")
WinActivate("Roxio Creator Starter Setup", "Setup Wizard Complet")
WinWaitActive("Roxio Creator Starter Setup","Setup Wizard Complet")
Send("!F")
WinWait("Roxio Creator Starter Setup", "You must restart you")
WinActivate("Roxio Creator Starter Setup", "You must restart you")
WinWaitActive("Roxio Creator Starter","You must restart you")
Send("!N")

If WinExists ( $SF_1 ) Then Exit

edit: I agree with JLogan3o13 that silent install seems like a more practical thing for you to do though.

Edited by Aktonius

Share this post


Link to post
Share on other sites

Gentlemen, thank you very much for your suggestions and for taking the time to reply. I'll try them both just as a learning experience and will let you know how it goes.

Share this post


Link to post
Share on other sites

Sometimes the buttons don't enable for a few seconds. I would suggest getting the control handles, and then wait for the control state to be enabled.

ControlGetHandle

ControlCommand option: "IsEnabled", ""


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

jdelaney: How would I integrate the Control Handles into the script?

For example, the script never reaches this dialog box:

WinWait("Roxio Creator Starter Setup", "Setup Wizard Complet")

WinActivate("Roxio Creator Starter Setup", "Setup Wizard Complet")

WinWaitActive("Roxio Creator Starter Setup","Setup Wizard Complet")

Send("!F")

JLogan3o13: That switch works just fine... was able to install with a batch file.

Aktonius: Something went wrong, it now stopped at the 2nd screen where the following keys need to be passed to it:

Send("!A")

Send("!N")

Thanks again.

Edited by capnmaximus

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Add this after each line ConsoleWrite("Script is now at step N.."&@lf) this is how you will know which line executed and where the script stops. I am not sure why it stopped because it can be anything from Bad text used for win function in that part or Send !a and Send !n dont produce any results.

After looking again i see you use "&" in the text of win functions, is this really displayed in title? Try to remove it.

Edited by Aktonius

Share this post


Link to post
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
Sign in to follow this  
Followers 0