shelleycat Posted February 7, 2010 Share Posted February 7, 2010 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 Link to comment Share on other sites More sharing options...
shelleycat Posted February 7, 2010 Author Share Posted February 7, 2010 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. Link to comment Share on other sites More sharing options...
Zedna Posted February 7, 2010 Share Posted February 7, 2010 To improve your script try to use ControlClick instead of MouseClick and ControlSend instead of Send. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
shelleycat Posted February 7, 2010 Author Share Posted February 7, 2010 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" ) Link to comment Share on other sites More sharing options...
Bert Posted February 7, 2010 Share Posted February 7, 2010 With InstallShield, you may have command line support. This would make the install easy to do. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now