Jump to content

Script stops before installation completes...


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

"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

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
Link to comment
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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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