Tikkatakka Posted March 13, 2021 Posted March 13, 2021 Hi there, This is my second project using auto IT and have run into a problem I cant surmount myself. Usually I am progressing things using examples from here, and the web in general, automating installations - my usual remit with AutoIT. Part of my job requires installing office 2016 in upgrade mode. All is well until the process completes and a "Close" button appears. Using the Window Info tool literally 'nothing' has changed in light of visible/hidden text, control buttons/ID's or anything as far as I can tell. It's rather frustrating. I have tried taking off Spy++ to see if that reveals more info but to no avail. I can use a sleep command but I'm dealing with SDD machines and older HDD so it's going to be unreliable unless I create a massive timeout to takecare of the install time differences which then defeats the purpose of what I'm attempting to achieve. Is there perhaps way to silently keep clicking in the mouse coordinates region of where the button appears and then stop once the button is pressed so I can then progress with the rest of it, which is easy enough (new window info & button ID's etc.) ? Code so far below, apologies if it's really banal stuff, keen to see how to progress from here for other scenarios that maybe similar in future projects. Thanks in advance for any ideas. ; Script Start - Add your code below here #requireadmin AutoItSetOption('SendKeyDelay', 5) Run(@ScriptDir & '\setup.exe') AutoItSetOption('MouseCoordMode', 0) WinWait('Microsoft Office Professional Plus 2016', 'EULAID:O16_RTM_VL.1_RTM_EN') WinActivate('Microsoft Office Professional Plus 2016') sleep(3000) MouseClick('primary', 175, 515, 1, 0) sleep(3000) MouseClick('primary', 500, 520, 1, 0) WinWait('Microsoft Office Professional Plus 2016') WinActivate('Microsoft Office Professional Plus 2016') MouseClick('primary', 310, 213, 1, 0) sleep(350000) WinWait('Microsoft Office Professional Plus 2016') WinActivate('Microsoft Office Professional Plus 2016') MouseClick('primary', 548, 522, 1, 0) WinWait('Setup') WinActivate('Setup') sleep(500) ControlClick('Setup', '', 'Button1') ############################################################# summary of window info :- >>>> Window <<<< Title: Microsoft Office Professional Plus 2016 Class: SetupExe Position: 652, 185 Size: 616, 564 Style: 0x14C80000 ExStyle: 0x00000100 Handle: 0x00000000001603B6 >>>> Control <<<< Class: NetUIHWND Instance: 1 ClassnameNN: NetUIHWND1 Name: Advanced (Class): [CLASS:NetUIHWND; INSTANCE:1] ID: Text: Position: 0, 0 Size: 610, 535 ControlClick Coords: 238, 229 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x0000000000050420 >>>> Mouse <<<< Position: 241, 255 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< PLEASE NOTE: Your use of this software is subject to the terms and conditions of the license agreement by which you acquired this software. For instance, if you are: • a volume license customer, use of this software is subject to your volume license agreement. • a MSDN customer, use of this software is subject to the MSDN agreement. You may not use this software if you have not validly acquired a license for the software from Microsoft or its licensed distributors. EULAID:O16_RTM_VL.1_RTM_EN Admin A C:\Program Files (x86)\Microsoft Office\
Moderators Melba23 Posted March 13, 2021 Moderators Posted March 13, 2021 Moved to the appropriate forum. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Earthshine Posted March 13, 2021 Posted March 13, 2021 (edited) Use SILENT INSTALL switch from command line Use this guide You will need a configuration XML file https://marckean.com/2013/07/01/fully-automate-the-installation-of-office-365/ then run setup.exe /configure configuration.xml Edited March 13, 2021 by Earthshine My resources are limited. You must ask the right questions
Earthshine Posted March 13, 2021 Posted March 13, 2021 Other than that you will have to use you Uiautomation Because standard autoit cannot interact with WPF forms My resources are limited. You must ask the right questions
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