Sign in to follow this  
Followers 0
hmsSurprise

Automating MySQL installations

4 posts in this topic

Greetings,

I need to do a lot of repetitive server setups. I cannot use imaging as each has different disk configurations in addition the fact there is already software loaded on them. One of the apps I add is MySQL. I worked the examples and was quite impressed but now I am stuck. The window selections have no alt keys defined and others need check boxes unchecked, etc. Before I go too far I would like to find out if the setup windows can all be handled. Please tell me if the following is doable.

Thanx,

jh

First window - Next (Button1) is highlighted so sendining {Enter} should work, right?

Second window - Three radio buttons, Typical, Complete, Custom, no alts defined. I need Custom(Control ID 73). Next(Button6) is default.

Third window - Need to click "Change..." to change install directory.

3A - Need to select "Folder name" box, remove existing path, and replace with new one. Afterwards OK is default button.

3 - Next (Button4) is default again.

4- Install (Button1) is default.

5- Need to select third radio button (Skip Sign-Up) whose Control ID is different each time I run the program, but classNameNN = TTntRadioButton.UnicodeClass1. Click Next

6- Click Finish (Button 1)

;Next the instance config Setup starts.

1- Title: MySQL Server Instance Configuration Wizard. Next is default.

2- 7 Click default Next.

8- Need to check box with ClassName "TTntCheckBox.UnicodeClass1". Then click next.

9- Enter password in box with ClassName TTntEdit.UnicodeClass3" and box with ClassName "TTntEdit.UnicodeClass1". Click enter.

10- Click Execute - ClassName TTntButton.UnicodeClass3.

10E- At this point an Error pop-up may present itself. How do I check for its existance?

11 - Click Finish

Share this post


Link to post
Share on other sites



You may want to try using the Control... functions.

I have automated an installer for UltraVNC, look at how this is done.

CODE
FileInstall("D:\Jos\UltraVNC-102-Setup.exe",@ScriptDir &
"\UltraVNC-102-Setup.exe")

Opt("WinTitleMatchMode",4)

Run("UltraVNC-102-Setup.exe")

WinWait("Classname=TSelectLanguageForm")
$Hwnd = WinGetHandle("Classname=TSelectLanguageForm")

ControlClick($Hwnd,"","TButton1")

WinWait("Classname=TWizardForm")
$Hwnd = WinGetHandle("Classname=TWizardForm")

ControlClick($Hwnd,"","TButton1")
Sleep(800)

ControlClick($Hwnd,"","TRadioButton1")
ControlClick($Hwnd,"","TButton2")
Sleep(800)

ControlClick($Hwnd,"","TButton2")
Sleep(800)

ControlSend($Hwnd,"","TEdit1",@ScriptDir & "\TestDir\")
ControlClick($Hwnd,"","TButton3")
Sleep(800)

ControlSend($Hwnd,"", "TComboBox1","{DOWN}")
ControlClick($Hwnd,"","TButton3")
Sleep(800)

ControlClick($Hwnd,"","TButton4")
Sleep(800)

ControlClick($Hwnd,"","TButton4")
Sleep(800)

ControlClick($Hwnd,"","TButton4")
Sleep(800)

Share this post


Link to post
Share on other sites

You may want to try using the Control... functions.

I have automated an installer for UltraVNC, look at how this is done.

CODE
FileInstall("D:\Jos\UltraVNC-102-Setup.exe",@ScriptDir &
"\UltraVNC-102-Setup.exe")

Opt("WinTitleMatchMode",4)

Run("UltraVNC-102-Setup.exe")

WinWait("Classname=TSelectLanguageForm")
$Hwnd = WinGetHandle("Classname=TSelectLanguageForm")

ControlClick($Hwnd,"","TButton1")

WinWait("Classname=TWizardForm")
$Hwnd = WinGetHandle("Classname=TWizardForm")

ControlClick($Hwnd,"","TButton1")
Sleep(800)

ControlClick($Hwnd,"","TRadioButton1")
ControlClick($Hwnd,"","TButton2")
Sleep(800)

ControlClick($Hwnd,"","TButton2")
Sleep(800)

ControlSend($Hwnd,"","TEdit1",@ScriptDir & "\TestDir\")
ControlClick($Hwnd,"","TButton3")
Sleep(800)

ControlSend($Hwnd,"", "TComboBox1","{DOWN}")
ControlClick($Hwnd,"","TButton3")
Sleep(800)

ControlClick($Hwnd,"","TButton4")
Sleep(800)

ControlClick($Hwnd,"","TButton4")
Sleep(800)

ControlClick($Hwnd,"","TButton4")
Sleep(800)

Share this post


Link to post
Share on other sites

Thanks, I''l give that a read.

jh

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