rsn Posted July 18, 2022 Posted July 18, 2022 I'm trying to automate the install of an application that uses InstallShield exe. This particular app isn't a wrapper for an MSI and uses a custom action that trips up the /r recording. So far I can clear most of the dialog boxes but I can seem to get ControlTreeView to select the check boxes. $hWND = Winwait ( "Pro Filing Client - InstallShield Wizard" ) $hControl = ControlGetHandle ( $hWND , "" , "SysTreeView321" ) ControlTreeView ( $hWND , "" , $hControl , "IsChecked" , "#0" ) Returns 0 indicating that it's an unchecked item. $hWND = Winwait ( "Pro Filing Client - InstallShield Wizard" ) $hControl = ControlGetHandle ( $hWND , "" , "SysTreeView321" ) ControlTreeView ( $hWND , "" , $hControl , "exists" , "#0" ) Returns 0 indicating that it doesn't exist. $hWND = Winwait ( "Pro Filing Client - InstallShield Wizard" ) $hControl = ControlGetHandle ( $hWND , "" , "SysTreeView321" ) $sText = ControlTreeView ( $hWND , "" , $hControl , "Check" , "#0" ) Returns 1 indicates an error but I don't know what that issue is or why. Installshield dialog and AutoIt Window info attached. I'd appreciate insight or help anyone can offer. Thank you rsn
orbs Posted July 19, 2022 Posted July 19, 2022 it seems very unlikely that an InstallShield Wizard does not have a silent installation option. i'd advise you look carefully into the product web site, docs, faq, support forum, etc. to locate that option. what is this product? can you post a link to the official web site? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
rsn Posted July 19, 2022 Author Posted July 19, 2022 I appreciate the advice @orbs. As I said in my original post, this installer isn't an MSI wrapper and there are custom actions in the installer script that the response file can't deal with. Otherwise this would be a breeze. The application is part of ProLaw (https://legal.thomsonreuters.com/en/products/prolaw), an attorney case management system our organization (a local government) uses. This, like much of the software we end up supporting, is dreadful on the client install side. Generally speaking, I can get just about any software configured and deployed inside of a few days. But this requires the end user to be an admin during install even though it's per user ( ! ) and the installer doesn't pay attention to some of the response file because of the custom actions. If this doesn't end up working, I can still re-package it with a delta capture. I was just hoping to be able to "home grow it," as it were.
TheXman Posted July 19, 2022 Posted July 19, 2022 (edited) Have you tried using the functions in GuiTreeView.au3 like: _GUICtrlTreeView_GetItemByIndex : Retrieve the handle of the item by its position in the list of child items _GUICtrlTreeView_GetChecked : Indicates if a item has its checkbox checked _GUICtrlTreeView_SetChecked : Sets whether a item has it's checkbox checked or not Edited July 19, 2022 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
KaFu Posted July 19, 2022 Posted July 19, 2022 Maybe it’s an UAC issue? Try to run your script as admin. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
rsn Posted July 20, 2022 Author Posted July 20, 2022 @TheXman I just tried your suggestions. _GUICtrlTreeView_GetChecked returns that it's unchecked but _GUICtrlTreeView_SetChecked doesn't check any of the boxes. My guess is that the dialog identifies as SysTreeView32 but contains some custom elements that cause AutoIt to not work as intended. @KaFu I have UAC turned off for the test PC. I've run the installer and the script as a user and with an elevated token (not just admin) and still doesn't work. I lay the blame solely on this installer (and it's author) and not on AutoIt since my testing in other applications AutoIt works splendidly.
orbs Posted July 20, 2022 Posted July 20, 2022 On 7/19/2022 at 7:00 PM, rsn said: This, like much of the software we end up supporting, is dreadful on the client install side. On 7/19/2022 at 7:00 PM, rsn said: But this requires the end user to be an admin during install even though it's per user ( ! ) i honestly sympathize with your statements, as i've encountered such in the past... i still fume about it when i remember :-) fortunately there were not too many endpoint targets back then, and a rather helpful helpdesk team, so we handled the installations in person (most of them remotely). i can't help regarding the ListView issue, although it seems like a rather trivial control for AutoIt to handle. i think i would go for the repackaging strategy. judging by the installer UI, it seems like an old enough application to not be messing about with core system components, so that may well be the better approach. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
KaFu Posted July 20, 2022 Posted July 20, 2022 Is it a 64Bit program? Then try using Autoit 64Bit too. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
jugador Posted July 21, 2022 Posted July 21, 2022 (edited) try ControlTreeView($hWND, "", $hControl, "Select", "#0|#0") edit: i guess "#0|#0" will not work as "Exists","#0" return 0 for you Edited July 21, 2022 by jugador
rsn Posted July 21, 2022 Author Posted July 21, 2022 @KaFu I tried running with and without the x64 flag and compiling as both too, just in case running from Scite and running the executable made a difference. Thank you for the input. @jugador I did actually try that early on along with 3 deep, just in case the devs made some weird choices (which, don't get me wrong, they did!). Thanks for the reply. I'm going to give up on it for now and try to repackage it as a delta capture. My thanks to everyone that offered advice, input and help. You all have my gratitude.
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