Listener Posted January 27, 2015 Posted January 27, 2015 Hi, i have a little Problem. I want to install a program without user interaction. The installer starts and AutoIT wait for the window to be active, but the button isn´t pushed. I used many variants of ControlClick to push it, but nothing worked. I used the Button-ID the name of it and so on. Actual Source Code: #include <MsgBoxConstants.au3> $Title = "Installer Language" Runas( "administrator" , "domain" , "password" , 0, "path" ) WinWaitActive($Title, "Please select a language.") WinActivate($Title,"Please select a language.") ControlClick($Title,"Please select a language.", "OK", "left") ;MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10) ;ControlClick ($Title, "" ,1 , 75 , 23 ) ;Send("{ENTER}") Au3Info Summary: expandcollapse popup>>>> Window <<<< Title: Installer Language Class: #32770 Position: 813, 501 Size: 294, 157 Style: 0x94C808CC ExStyle: 0x00010101 Handle: 0x0000000000EA050E >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 Name: Advanced (Class): [CLASS:Button; INSTANCE:1] ID: 1 Text: OK Position: 113, 96 Size: 75, 23 ControlClick Coords: 41, 12 Style: 0x50010001 ExStyle: 0x00000004 Handle: 0x00000000003E0C12 >>>> Mouse <<<< Position: 970, 635 Cursor ID: 0 Color: 0xC9EAEA >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Deutsch OK Cancel Please select a language. >>>> Hidden Text <<<< I don´t know what to do. Please help me.
AutoDub Posted January 27, 2015 Posted January 27, 2015 I'm having the exact same issue in my thread '?do=embed' frameborder='0' data-embedContent>>. Is the installation window a child window as the one in this picture; '> ?
Listener Posted January 27, 2015 Author Posted January 27, 2015 http://www.directupload.net/file/d/3880/pm85fms7_jpg.htm Its not an child windows
AutoDub Posted January 27, 2015 Posted January 27, 2015 (edited) http://www.directupload.net/file/d/3880/pm85fms7_jpg.htm Its not an child windows Try with just ControlClick($Title, "", "Button1") or ControlClick("Installer Language", "", "Button1") Edit: I see that your window has the same class as mine, Class: #32770. Not sure if it means anything, just find it interesting that it's the same class for the two windows, and we are both experiencing issues interacting with it. Edited January 27, 2015 by AutoDub
Developers Jos Posted January 27, 2015 Developers Posted January 27, 2015 Dont think you can use Control???? Commands on a program running under different credentials. Try running the whole script with a runas and use a run() command in the script. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Listener Posted January 27, 2015 Author Posted January 27, 2015 @Jos It works. Thank you! But my problem is, that it has to be runned as administrator and the Users dont have the permission to do that.
Developers Jos Posted January 27, 2015 Developers Posted January 27, 2015 First reshell your script with the right credentials and then do what you need to do. You can use a commandline parameter to indicate the seconds stage. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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