andrewcrawford131 Posted May 31, 2021 Posted May 31, 2021 Hi All, I am trying to create a script to record the actions off a program installer using au3recorder and then compile it to exe to run on the windows installation. The problems i have is it selecting the folder it is in just now but in the windows install it will be a different folder also it not recording all actions i do so i need to manually press buttons. yes most software have slient switches but i want to be able to customise my installs like i would after a windows installation
Nine Posted May 31, 2021 Posted May 31, 2021 You will need to give us a tad more information than that. What is the application you are trying to install ? Have you try to use au3info.exe tool to see if the screen objects are detectable ? Instead of Send and MouseClick, using Control* functions might greatly help you and provide a more robust solution. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
water Posted May 31, 2021 Posted May 31, 2021 Most of the programs provide a silent installation. This way you can pre-record the configuration of the program. So you avoid the need to automate the installation GUI. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
spudw2k Posted June 2, 2021 Posted June 2, 2021 I agree with the silent install approach if the installer supports it. Have you looked if the installer supports that? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
andrewcrawford131 Posted June 3, 2021 Author Posted June 3, 2021 On 5/31/2021 at 1:50 PM, Nine said: You will need to give us a tad more information than that. What is the application you are trying to install ? Have you try to use au3info.exe tool to see if the screen objects are detectable ? Instead of Send and MouseClick, using Control* functions might greatly help you and provide a more robust solution. What information do you need? im all for any solution that works but i will need a guide on how to write teh scripts myself
andrewcrawford131 Posted June 3, 2021 Author Posted June 3, 2021 On 5/31/2021 at 1:57 PM, water said: Most of the programs provide a silent installation. This way you can pre-record the configuration of the program. So you avoid the need to automate the installation GUI. Yes but example one of the software i want to use give silent install but it install opera as well i dnt want that i want to customise the install fully so i need to work out how to use autoit correctly, also silent installs dnt get rid of windows smartscan popup
Nine Posted June 3, 2021 Posted June 3, 2021 7 minutes ago, andrewcrawford131 said: What information do you need? Well, let start with the 2 questions that follow the first sentence...You could also post the result of the au3info tool along with a screen shot of the installer windows. And of course, the most important information that we need is a first draft of your script. Do not expect us to write it for you, as you will be terribly be disappointed. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
andrewcrawford131 Posted July 12, 2021 Author Posted July 12, 2021 On 6/3/2021 at 8:28 PM, Nine said: Well, let start with the 2 questions that follow the first sentence...You could also post the result of the au3info tool along with a screen shot of the installer windows. And of course, the most important information that we need is a first draft of your script. Do not expect us to write it for you, as you will be terribly be disappointed. I dnt expect anyone but me to write it, i am just looking for guidance how to do it and pointers to where i need to look. sorry i work a lot so not had time to reply will reply with the basic script soon
andrewcrawford131 Posted July 12, 2021 Author Posted July 12, 2021 On 6/3/2021 at 8:28 PM, Nine said: Well, let start with the 2 questions that follow the first sentence...You could also post the result of the au3info tool along with a screen shot of the installer windows. And of course, the most important information that we need is a first draft of your script. Do not expect us to write it for you, as you will be terribly be disappointed. Here is the script #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000809) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00000809' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000809->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- _WinWaitActivate("Downloads","") MouseClick("left",237,191,1) MouseDown("left") MouseMove(237,190) MouseUp("left") _WinWaitActivate("Microsoft Visual C++ 2015 Redistributable (x64) - 14.0.23026 Setup","") MouseClick("left",170,237,1) MouseMove(357,261) MouseDown("left") MouseMove(357,260) MouseUp("left") MouseClick("left",359,277,1) MouseClick("left",443,281,1) #endregion --- Au3Recorder generated code End --- Dnt know how to use au3info or where it is located what do you mean screenshot of the installer windows? i am happy to do this " Instead of Send and MouseClick, using Control* functions might greatly help you and provide a more robust solution." but i have never programs a au3 script before so i need so basics of how i do it it and how the commands works the first application i am trying to install is Microsoft Visual C++ 2015 Redistributable (x64) - 14.0.23026 but i have loads more i want to perfect this and then i use the skills to do other and then i will only post for bug finding.
JockoDundee Posted July 12, 2021 Posted July 12, 2021 This appears to be all generated code based on the recording, not any that you added, correct? If so, you might be able to remedy your original problem: On 5/31/2021 at 5:32 AM, andrewcrawford131 said: The problems i have is it selecting the folder it is in just now but in the windows install it will be a different folder It appears from the recording that you just clicked on the folder you wanted it to be installed in, which obviously will not be portable, as the directory could be shown at different x,y coords for many reasons. Instead, you should record again, but this time when choosing the directory, use the keyboard to enter the destination folder name manually. This at least will be repeatable. Even if the folder name still varies at runtime, recording again will at least show us where in the code to manipulate and send the destination directory. Still, as @Ninealluded to, using recorder related commands like Send and Mouseclick, are often very brittle. Even if you are successful here in the short term, you should consider Control functions ultimately. Try typing au3info in your Windows search bar. Code hard, but don’t hard code...
water Posted July 12, 2021 Posted July 12, 2021 Did you have a look at the Vollatran project? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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