Jump to content

Problem With Install Script


Recommended Posts

Hi guys,

I use the following script to automate Xilisoft MP4 Converter installation:

Run("x-mp4-converter.exe")

WinWaitActive("Installer Language", "Please select a language.")

Send("{ENTER}")

WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "I &Agree")

Send("!a")

WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Components")

Send("!n")

WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Install Location")

Send("!n")

WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Start Menu Folder")

Send("{ENTER}")

WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "&Finish")

Send("{ENTER}")

The installer starts running but crashes during the installation procedure. Right after the execution of the bold line, at 25% of the progress bar. The installer works perfectly if I don't run it using the script.

Does anyone know what's wrong?

I'm new to using AutoIt but I've made a couple of working auto-installation scripts for an unattended XP CD.

Thanks.

Link to comment
Share on other sites

How big is the installation file? Is it possible for you to upload it for up to download?

With the file i can help you better, but this may help:

Run("x-mp4-converter.exe")
WinWaitActive("Installer Language", "Please select a language.")
Send("{ENTER}")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "I &Agree")
Send("!a")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Components")
Send("!n")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Install Location")
Send("!n")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Start Menu Folder")
Send("{ENTER}")
Sleep(10000)
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "&Finish")
Send("{ENTER}")

#)

Link to comment
Share on other sites

  • Moderators

I always try to use ControlClick() instead of using Send().

This is what I came up with, but like you said it hangs the installer.

Run("x-mp4-converter.exe")
WinWaitActive("Installer Language")
ControlClick("Installer Language", "", "Button1")
WinWaitActive("Xilisoft MP4 Converter", "License Agreement")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Select components to install")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Choose Install Location")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Choose Start Menu Folder")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Click Finish to close this wizard")
ControlClick("Xilisoft MP4 Converter", "", "Button4")
ControlClick("Xilisoft MP4 Converter", "", "Button2")

It has something to do with AutoIt starting it.

Edited by big_daddy
Link to comment
Share on other sites

This does not hang as with specifying fullpath to the executable. Strange as I start it in the same directory manually. Perhaps the installer uses the fullpath that started it in it's install routine somehow. Heh, their are installers out there where if you change the name of them, then they can fail somewhat :) . Sandboxie is one that you should not change the name of the installer as it copies itself to a location to act as a unnstaller as well.

Opt('TrayIconDebug', 1)
Run(@ScriptDir & "\x-mp4-converter.exe")
WinWaitActive("Installer Language", "Please select a language.")
Send("{ENTER}")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "I &Agree")
Send("!a")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Components")
Send("!n")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Install Location")
Send("!n")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "Choose Start Menu Folder")
Send("{ENTER}")
WinWaitActive("Xilisoft MP4 Converter 2.1.57.1228b Setup ", "&Finish")
Send("{ENTER}")
Link to comment
Share on other sites

  • Moderators

This does not hang as with specifying fullpath to the executable. Strange as I start it in the same directory manually. Perhaps the installer uses the fullpath that started it in it's install routine somehow. Heh, their are installers out there where if you change the name of them, then they can fail somewhat :) . Sandboxie is one that you should not change the name of the installer as it copies itself to a location to act as a unnstaller as well.

Good find, I never would have guessed that one. I still think he should use the ControlClick() though :mellow:

Run(@ScriptDir & "\x-mp4-converter.exe")
WinWaitActive("Installer Language")
ControlClick("Installer Language", "", "Button1")
WinWaitActive("Xilisoft MP4 Converter", "License Agreement")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Select components to install")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Choose Install Location")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Choose Start Menu Folder")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
WinWaitActive("Xilisoft MP4 Converter", "Click Finish to close this wizard")
ControlClick("Xilisoft MP4 Converter", "", "Button4")
ControlClick("Xilisoft MP4 Converter", "", "Button2")
Link to comment
Share on other sites

Good find, I never would have guessed that one. I still think he should use the ControlClick() though :)

I agree. ControlClick as default is the most efficient and reliable method. But I use WinWait for the windows to arrive as Control* functions do not need active windows. I guess a beginner can only use what they understand until they are wise enough to use the full functional force :) that AutoIt has to offer.

@SteMan

Your welcome. Glad to help you succeed. :mellow:

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