Jump to content

Help writing install script


Recommended Posts

Hi,

I am trying to write a script to install some software. Its giving me issues.

To explain the Wizard:

Opens up and decompresses the image, the title of the window is "Premier Integrated Teller Client - PTI1151 - InstallShield Wizard"

It the closes that window and runs a windows installer load screen.

Next it reopens the "Premier Integrated Teller Client - PTI1151 - InstallShield Wizard" window and does some more checking before the "next" button turns from grey to active. I cant get a way for AutoIT to wait for that Next button to become active.

Here is my script so far:

Run('C:\Documents and Settings\e042921\Desktop\PTI1151S.EXE')
WinWaitActive("[TITLE:Premier Integrated Teller Client - PTI1151 - InstallShield Wizard; INSTANCE:2]", "")
Send("{ENTER}{TAB}{TAB}{TAB}{SPACE}{TAB}{SPACE}{TAB}{SPACE}{TAB}{SPACE}{TAB}{SPACE}{TAB}{SPACE}{TAB}{SPACE}{TAB}{TAB}{ENTER}{TAB}{ENTER}{SHIFTDOWN}dsmintell{SHIFTUP}02{TAB}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{TAB}{ENTER}{TAB}{TAB}{TAB}{SPACE}{TAB}{ENTER}{TAB}{TAB}{ENTER}{ENTER}{ENTER}")

Screen shot of the final install with next active is in attachment.

Some window info:

Entire window:

>>> Window <<<<

Title: Premier Integrated Teller Client - PTI1151 - InstallShield Wizard

Class: MsiDialogCloseClass

Position: 178, 250

Size: 504, 386

Style: 0x14C80000

ExStyle: 0x00040100

Handle: 0x000E03EA

>>>> Control <<<<

Class:

Instance:

ClassnameNN:

Name:

Advanced (Class):

ID:

Text:

Position:

Size:

ControlClick Coords:

Style:

ExStyle:

Handle:

>>>> Mouse <<<<

Position: 609, 268

Cursor ID: 0

Color: 0x7E9DE5

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

&Next >

Cancel

< &Back

WARNING: This program is protected by copyright law and international treaties.

The InstallShield® Wizard will install Premier Integrated Teller Client - PTI1151 on your computer. To continue, click Next.

NewBinary5

Welcome to the InstallShield Wizard for Premier Integrated Teller Client - PTI1151

>>>> Hidden Text <<<<

Next button:

>>>> Window <<<<

Title: Premier Integrated Teller Client - PTI1151 - InstallShield Wizard

Class: MsiDialogCloseClass

Position: 178, 250

Size: 504, 386

Style: 0x14C80000

ExStyle: 0x00040100

Handle: 0x000E03EA

>>>> Control <<<<

Class: Button

Instance: 1

ClassnameNN: Button1

Name:

Advanced (Class): [CLASS:Button; INSTANCE:1]

ID: 19383

Text: &Next >

Position: 306, 324

Size: 88, 22

ControlClick Coords: 40, 9

Style: 0x50032001

ExStyle: 0x00000000

Handle: 0x001D0344

>>>> Mouse <<<<

Position: 527, 612

Cursor ID: 0

Color: 0x000000

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

&Next >

Cancel

< &Back

WARNING: This program is protected by copyright law and international treaties.

The InstallShield® Wizard will install Premier Integrated Teller Client - PTI1151 on your computer. To continue, click Next.

NewBinary5

Welcome to the InstallShield Wizard for Premier Integrated Teller Client - PTI1151

>>>> Hidden Text <<<<

post-62687-0-66945300-1296141995_thumb.p

Link to comment
Share on other sites

Get the information of the Next button and use something like this:

Do
    $state = ControlCommand ($title, "", $ButtonInfo, "IsEnabled", "")
    Sleep (100)
Until $state = 1

Obviously you will have to fill in title and button info but this will make your script stop until that button is enabled. Look up ControlCommand in the help file for more information on it as well.

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

Thank you. That works great

next issue. How do I make selection in a listbox

see screenshot.

Window details:

>>>> Window <<<<

Title: Premier Integrated Teller Client - PTI1151 - InstallShield Wizard

Class: MsiDialogCloseClass

Position: 363, 203

Size: 504, 386

Style: 0x14C80000

ExStyle: 0x00040100

Handle: 0x000E032C

>>>> Control <<<<

Class: SysListView32

Instance: 1

ClassnameNN: SysListView321

Name:

Advanced (Class): [CLASS:SysListView32; INSTANCE:1]

ID: 28487

Text:

Position: 20, 133

Size: 266, 164

ControlClick Coords: 156, 103

Style: 0x50B3404D

ExStyle: 0x00000000

Handle: 0x000E037C

>>>> Mouse <<<<

Position: 542, 468

Cursor ID: 0

Color: 0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

InSight Database

ds

&Next >

< &Back

Cancel

Insight Server Name

Please enter the database information.

Database Information

InteriorBin1

InstallShield

InstallShield

>>>> Hidden Text <<<<

I need to select Database 8 in the list.

Thanks,

Mitchell

post-62687-0-97990600-1296150370_thumb.p

Link to comment
Share on other sites

Look in the help file for _GuiCtrlListView_* and create some code yourself. The help file will show you examples and explain how to use everything that AutoIt can do.

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

I'm a noob as well, but if you are utilizing the Recorder...does it not capture your down arrow key clicks. In other words...do not utilize your mouse while you are recording (keyboard only) and I think it should grab everything you need.

yea i tried that as well but it doesnt seem to work at all.

Link to comment
Share on other sites

You're on the right track.

You can use:

$handle = ControlGetHandle ($title, "", $controlinfo)

To get the handle of the control and then pass that variable into the _GuiCtrl* command to do what you want. Those commands can be used even if you didn't create the GUI yourself.

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

still not getting anywhere. this is the code I have so far. doest seem to effect the box:

$handle = ControlGetHandle ($title, "", 28487)

_GUICtrlListBox_ClickItem($handle, 8, "left", True)

Does this look like it would work? let me know if you need more control data from the window.

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