Sign in to follow this  
Followers 0
shelleycat

Newbie - help with an installer

5 posts in this topic

The installer is for some educational software, and we have several programs

with the same type of installer. I want to automate the setup of several

programs onto a number of new laptops.

I can start the setup, which appears to be an early installshield (I think

its 16 bit). It brings up a whole screen background and an initial

window "Welcome". The Wingettitle and wingettext do bring

up the title and text of the window I want to send a key to.

I cannot send any key or mouse click to the

Next button. This is the script I am trying, the mouse position

is correct for the button, and the focus appears to be on the Next button.

Neither the mouse clicks or the space are accepted by the installer.

This is the first of several screens which need clicking.

The installer does not accept any /silent -s -r /r switches etc.

Shellexecute( "e:\setup.exe", "e:\" )
Sleep( 12000 )

$xx = WinGetTitle( "Welcome")
MsgBox( 0, "xx is", $xx ) ; this works, 
$txt = WinGetText( $xx )   ; this works
MsgBox( 0, "txt is", $txt )

$hndl = WinGetHandle( $xx) ; this works

If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
    ; Send some text directly to this window's edit control
    ControlSend($hndl, "", 1, "{ENTER}") ; no effect
EndIf


$ret = MouseClick( "Left", 296, 301 )  ; does not work - returns 1 though
MsgBox( 0, "ret is", $ret)


AutoItSetOption( "SendKeyDownDelay", 100); 
Send ( "{SPACE}") ; does not work

Share this post


Link to post
Share on other sites



I may have it cracked - I am installing on Windows 7 and the UAC was interfering. I have just turned the UAC off, and the windows are now accepting something.

Share this post


Link to post
Share on other sites

Thanks, but having discovered that UAC was having an effect, the script is now reduced to

; AutoIt script to automate setup of Catchup CD 1
;  assumes the CD is at the directory e:\
;  If on a different network drive change startpath variable

$startpath = "e:\"

Shellexecute( $startpath & "setup.exe", $startpath )
Sleep( 5000 )

WinWaitActive ( "Welcome" ) 
Send ( "{SPACE}")

WinWaitActive ( "Setup Type" )
Send ( "{TAB}{TAB}{TAB}{SPACE}" )

WinWaitActive ( "Select Program Folder" )
Send ( "{TAB}{TAB}{TAB}{SPACE}" )
 
WinWaitActive ( "Start Copying Files" )
Send ( "{ENTER}" )

WinWaitActive ( "Setup Complete" )
Send ( "{ENTER}" )

Sleep( 2000 )
Run ( "cmd /C net share A5W_DATA=c:\Windows\A5W_DATA /Grant:Everyone,FULL" )

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