Jump to content

Recommended Posts

Posted (edited)
#include <Constants.au3>

Func Install()
   ConsoleWrite("Install EasyLog" & @LF)
   Local $handle = WinWaitActive("EasyLog USB Device Driver Installer")
   ConsoleWrite("Install EasyLog2 " & $handle & @LF)
   Local $blah = ControlClick($handle, "", "[CLASS:Button; INSTANCE:1]", "Left", 1)
   ConsoleWrite("Install EasyLog3 " & $blah & @LF)
   WinClose($handle)
EndFunc

Install()
ConsoleWrite("End of Install!" & @LF)

Trying to get AutoIt to click "Install" on the EasyLogUSB Device Driver Installer window.

Console displays:

Install EasyLog
Install EasyLog2 0x001B041E
Install EasyLog3 1
End of Install!

Windows Info confirms the Handle is 0x001B041E

chocolatey_test_environment_windows_2016__Running_.thumb.png.8419edba375241078635d16dd65d89ea.png

Window Info for the Control

chocolatey_test_environment_windows_2016__Running_.thumb.png.3544dd0b1a4313694e25d3c315afe9b7.png

For the life of me I cannot figure out why the script is not working. 

Even $blah says the ControlClick succeeded.

I've tried Send("{ENTER}") and MouseClick() those didn't work either.

Any help would be appreciated.

Thanks.

Edited by basictheprogram
Posted

Changed to WinGetHandle and still doesn't work. Here is the code now.

#include <Constants.au3>

Func Install()
   ConsoleWrite("Install EasyLog" & @LF)
   Local $handle = WinGetHandle("EasyLog USB Device Driver Installer")
   ConsoleWrite("Install EasyLog2 " & $handle & @LF)
   Local $click = ControlClick($handle, "", "[CLASS:Button; INSTANCE:1]", "Left", 1)
   ConsoleWrite("Install EasyLog3 " & $click & @LF)
   Local $close = WinClose($handle)
   ConsoleWrite("Closing " & $close & @LF)
EndFunc

Install()
ConsoleWrite("End of Install!" & @LF)

Console output

Install EasyLog
Install EasyLog2 0x00220278
Install EasyLog3 1
Closing 1

 

Posted (edited)

never let it be said that I don't give n00bs fishes. but, that installer is using not a regular dialog class, it's MsiDialogClass, if it was regular this would work

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Global $TD_BTN_NEXT = '&Next >'
Global $TD_BTN_INSTALL = '&Install'
Global $TD_BTN_FINISH = '&Finish'
Global $TD_BTN_CANCEL = 'Cancel'
Global $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Global $TD_BTN_ALTFINISH = '&Finish'
Global $TD_BTN_ALLOW_ACCESS = '&Allow access'
Global $TD_BTN_REMOVE = '&Remove'
Global $TD_BTN_YES = '&Yes'
Global $TD_BTN_OK = 'OK'
Global $TD_BTN_TYPICAL = '&Typical'
Global $TD_EDIT_DATA = '99999'
Global $TD_TREE_NAME = 'Tree1'

Global $text = "EasyLog USB - InstallShield Wizard"
Global $class = "[CLASS:MsiDialogCloseClass]"
Global $button1 = "[CLASS:Button; INSTANCE:1]"
Global $button2 = "[CLASS:Button; INSTANCE:2]"
Global $button3 = "[CLASS:Button; INSTANCE:3]"
Global $button4 = "[CLASS:Button; INSTANCE:4]"
Global $button5 = "[CLASS:Button; INSTANCE:5]"
Global $combo = "[CLASS:ComboBox; INSTANCE:1]"

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Local $handle = WinActivate($text)
    _log4a_Info($handle)
    _log4a_Info('Begin Install()')
    _checkClickCtrl($class, $text, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button3, $TD_BTN_IAGREE, 0)
    _checkClickCtrl($class, $text, $button5, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_INSTALL, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_FINISH, 0)
    _log4a_Info('End Install()')
EndFunc

Install()

you will need the files below for this to work, and it has professional logging. LOL.

log4a.au3 WaitForControls.au3

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted

wait, i almost got that working, i will post back, the installer must run at Admin level and so must your script. stay tuned, i have it in a vm and testing.

My resources are limited. You must ask the right questions

 

Posted
1 hour ago, Nine said:

Have you tried #RequireAdmin ?

I have tried it and then nothing is displayed in the Console.

UAC is displayed, I click Yes, nothing happens.

Here is the console output

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "\\vboxsvr\projects\chocolatey\chocolatey-EasyLogUSB\tools\EasyLogUSB.au3"    
>Exit code: 0    Time: 27.7
 

 

Posted
Quote

 

never let it be said that I don't give n00bs fishes. but, that installer is using not a regular dialog class, it's MsiDialogClass, if it was regular this would work


 

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "\\VBOXSVR\projects\chocolatey\chocolatey-EasyLogUSB\tools\LoggingEasyLogUSB.au3"    
05\01\2019 10:56:01 | VAGRANT | Info | 0x00000000
05\01\2019 10:56:01 | VAGRANT | Info | Begin Install()
05\01\2019 10:56:01 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 10:56:01 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 10:56:01 | VAGRANT | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 10:56:01 | VAGRANT | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 10:56:01 | VAGRANT | Info | Searching for Ctrl Txt: &Next >
05\01\2019 10:56:01 | VAGRANT | Info | Timeout: 0
05\01\2019 10:56:01 | VAGRANT | Info | Time Delay (after click): 0

I click on the dialog nothing seems to happen.

 

Posted
13 minutes ago, basictheprogram said:

I have tried it and then nothing is displayed in the Console.

That's normal unless SciTE is also running as admin.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted (edited)
#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Global $TD_BTN_NEXT = '&Next >'
Global $TD_BTN_INSTALL = '&Install'
Global $TD_BTN_FINISH = '&Finish'
Global $TD_BTN_CANCEL = 'Cancel'
Global $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Global $TD_BTN_ALTFINISH = '&Finish'
Global $TD_BTN_ALLOW_ACCESS = '&Allow access'
Global $TD_BTN_REMOVE = '&Remove'
Global $TD_BTN_YES = '&Yes'
Global $TD_BTN_OK = 'OK'
Global $TD_BTN_TYPICAL = '&Typical'
Global $TD_EDIT_DATA = '99999'
Global $TD_TREE_NAME = 'Tree1'

Global $text = "EasyLog USB - InstallShield Wizard"
Global $class = "[CLASS:MsiDialogCloseClass]"
Global $button1 = "[CLASS:Button; INSTANCE:1]"
Global $button2 = "[CLASS:Button; INSTANCE:2]"
Global $button3 = "[CLASS:Button; INSTANCE:3]"
Global $button4 = "[CLASS:Button; INSTANCE:4]"
Global $button5 = "[CLASS:Button; INSTANCE:5]"
Global $combo = "[CLASS:ComboBox; INSTANCE:1]"

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Local $handle = WinActivate($text)
    _log4a_Info($handle)
    _log4a_Info('Begin Install()')
    _checkClickCtrl($class, $text, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button3, $TD_BTN_IAGREE, 0)
    _checkClickCtrl($class, $text, $button5, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_INSTALL, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_FINISH, 0)
    _log4a_Info('End Install()')
EndFunc

Install()

my example takes the msi installer and installs THAT. I will post code how to instasll the driver portion, also I updated the code. I will post back for that secondary install. the logging tells you EVERYTHING it's doing too, so it's easy to debug. gimme a minute dude.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted
9 minutes ago, BrewManNH said:

That's normal unless SciTE is also running as admin.

I activated local Administrator on my Windows 2016 vagrant in virtualbox VM and tried the logging code again and things still do not work as expected.

Console output below

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "\\vboxsvr\projects\chocolatey\chocolatey-EasyLogUSB\tools\LoggingEasyLogUSB.au3"    
05\01\2019 11:11:21 | VAGRANT | Info | 0x00000000
05\01\2019 11:11:21 | VAGRANT | Info | Begin Install()
05\01\2019 11:11:21 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 11:11:21 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
PS C:\projects\chocolatey\chocolatey-EasyLogUSB> whoami
vagrant\administrator

 

Posted (edited)

did you try my newest updated code???? you need the exe running first as well. you can add code to start it up if you want. this is mostly correct and complete

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Global $TD_BTN_NEXT = '&Next >'
Global $TD_BTN_INSTALL = '&Install'
Global $TD_BTN_INSTALL2 = 'Install'
Global $TD_BTN_FINISH = '&Finish'
Global $TD_BTN_CANCEL = 'Cancel'
Global $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Global $TD_BTN_ALTFINISH = '&Finish'
Global $TD_BTN_ALLOW_ACCESS = '&Allow access'
Global $TD_BTN_REMOVE = '&Remove'
Global $TD_BTN_YES = '&Yes'
Global $TD_BTN_OK = 'OK'
Global $TD_BTN_TYPICAL = '&Typical'
Global $TD_EDIT_DATA = '99999'
Global $TD_TREE_NAME = 'Tree1'

Global $text = "EasyLog USB - InstallShield Wizard"
Global $class = "[CLASS:MsiDialogCloseClass]"
Global $stdClass = '[Class:#32770]'
Global $button1 = "[CLASS:Button; INSTANCE:1]"
Global $button2 = "[CLASS:Button; INSTANCE:2]"
Global $button3 = "[CLASS:Button; INSTANCE:3]"
Global $button4 = "[CLASS:Button; INSTANCE:4]"
Global $button5 = "[CLASS:Button; INSTANCE:5]"

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Local $handle = WinActivate($text)
    _log4a_Info($handle)
    _log4a_Info('Begin Install()')
    _checkClickCtrl($class, $text, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button3, $TD_BTN_IAGREE, 0)
    _checkClickCtrl($class, $text, $button5, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_INSTALL, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_FINISH, 0)
    _checkClickCtrl($class, 'Install', $button1, $TD_BTN_INSTALL2, 0)
    _checkClickCtrl($class, 'OK', $button1, $TD_BTN_OK, 0)

    _log4a_Info('End Install()')

EndFunc

Install()

It installs this file

https://s3.amazonaws.com/lascar_downloads/EasyLogUSB+Installer.exe

 

first the IS install, then the cheesy driver install.

 

NOT COMPLETE. TESTED on 2008R2 , that cheesy second installer is not working yet

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted

You need to run SciTE as an administrator, right click the shortcut/exe and select "Run as administrator", then you can see in the console the consolewrites from a program that starts with #RequireAdmin.

#RequireAdmin causes the script to be restarted if the user running it doesn't have the Admin token coming from SciTE, so that's why it ends so quickly when it's not running at the same level as the script.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted (edited)

yes, run SciTE as admin. OK!! here is the FINAL script!! it works 100% on my Win10 and 2008R2 VMs. It installs that linked installer that I linked in a previous post. 100% test on clean vm with just autoit on it of course. Please send me donuts. Gluten Free ones, can't have it... SAD

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Global $TD_BTN_NEXT = '&Next >'
Global $TD_BTN_INSTALL = '&Install'
Global $TD_BTN_INSTALL2 = 'Install'
Global $TD_BTN_FINISH = '&Finish'
Global $TD_BTN_CANCEL = 'Cancel'
Global $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Global $TD_BTN_ALTFINISH = '&Finish'
Global $TD_BTN_ALLOW_ACCESS = '&Allow access'
Global $TD_BTN_REMOVE = '&Remove'
Global $TD_BTN_YES = '&Yes'
Global $TD_BTN_OK = 'OK'
Global $TD_BTN_TYPICAL = '&Typical'
Global $TD_EDIT_DATA = '99999'
Global $TD_TREE_NAME = 'Tree1'

Global $apptext = 'EasyLog USB Device Driver Installer'
Global $text = "EasyLog USB - InstallShield Wizard"
Global $class = "[CLASS:MsiDialogCloseClass]"
Global $stdClass = '[Class:#32770]'
Global $button1 = "[CLASS:Button; INSTANCE:1]"
Global $button2 = "[CLASS:Button; INSTANCE:2]"
Global $button3 = "[CLASS:Button; INSTANCE:3]"
Global $button4 = "[CLASS:Button; INSTANCE:4]"
Global $button5 = "[CLASS:Button; INSTANCE:5]"

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Local $handle = WinActivate($text)
    _log4a_Info($handle)
    _log4a_Info('Begin Install()')
    _checkClickCtrl($class, $text, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button3, $TD_BTN_IAGREE, 0)
    _checkClickCtrl($class, $text, $button5, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_INSTALL, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_FINISH, 0)
    _checkClickCtrl($stdClass, $apptext, $button1, $TD_BTN_INSTALL2, 0)
    _checkClickCtrl($stdClass, 'Success', $button1, $TD_BTN_OK, 0, 3)

    _log4a_Info('End Install()')

EndFunc

Install()

 

Note that the following do that driver install you were trying to do, the last two statements

    _checkClickCtrl($stdClass, $apptext, $button1, $TD_BTN_INSTALL2, 0)
    _checkClickCtrl($stdClass, 'Success', $button1, $TD_BTN_OK, 0, 3)
Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted
11 minutes ago, Earthshine said:

did you try my newest updated code???? you need the exe running first as well. you can add code to start it up if you want. this is mostly correct and complete

It installs this file

https://s3.amazonaws.com/lascar_downloads/EasyLogUSB+Installer.exe

first the IS install, then the cheesy driver install.

The new code installs the first part of the application but not the device driver. That still dialog still remains.

Console output

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "\\vboxsvr\projects\chocolatey\chocolatey-EasyLogUSB\tools\LoggingEasyLogUSB.au3"    
05\01\2019 11:27:59 | VAGRANT | Info | 0x00080372
05\01\2019 11:27:59 | VAGRANT | Info | Begin Install()
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Ctrl Txt: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Search: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Found: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | Found Ctrl Txt: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():End
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Control: [CLASS:Button; INSTANCE:3]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Ctrl Txt: I &accept the terms in the license agreement
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Search: I &accept the terms in the license agreement
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Found: I &accept the terms in the license agreement
05\01\2019 11:27:59 | VAGRANT | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Found Control: [CLASS:Button; INSTANCE:3]
05\01\2019 11:27:59 | VAGRANT | Info | Found Ctrl Txt: I &accept the terms in the license agreement
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | [CLASS:Button; INSTANCE:3]
05\01\2019 11:27:59 | VAGRANT | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:3]
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():End
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Control: [CLASS:Button; INSTANCE:5]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Ctrl Txt: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Search: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Found: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Found Control: [CLASS:Button; INSTANCE:5]
05\01\2019 11:27:59 | VAGRANT | Info | Found Ctrl Txt: &Next >
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | [CLASS:Button; INSTANCE:5]
05\01\2019 11:27:59 | VAGRANT | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:5]
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():End
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Ctrl Txt: &Install
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Search: &Install
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Found: &Install
05\01\2019 11:27:59 | VAGRANT | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | Found Ctrl Txt: &Install
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():End
05\01\2019 11:27:59 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 11:27:59 | VAGRANT | Info | Searching for Ctrl Txt: &Finish
05\01\2019 11:27:59 | VAGRANT | Info | Timeout: 0
05\01\2019 11:27:59 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Search: &Finish
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Found: < &Back
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Search: &Finish
05\01\2019 11:27:59 | VAGRANT | Info | Control Text Found: Cancel

<snip> many of the above text repeat many times


05\01\2019 11:28:00 | VAGRANT | Info | Control Text Found: &Finish
05\01\2019 11:28:00 | VAGRANT | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:28:00 | VAGRANT | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 11:28:00 | VAGRANT | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 11:28:00 | VAGRANT | Info | Found Ctrl Txt: &Finish
05\01\2019 11:28:00 | VAGRANT | Info | Timeout: 0
05\01\2019 11:28:00 | VAGRANT | Info | Time Delay (after click): 0
05\01\2019 11:28:00 | VAGRANT | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 11:28:00 | VAGRANT | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 11:28:00 | VAGRANT | Info | _checkClickCtrl():End
05\01\2019 11:28:00 | VAGRANT | Info | _checkClickCtrl():Begin
05\01\2019 11:28:00 | VAGRANT | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 11:28:00 | VAGRANT | Info | Searching for Text: Install
05\01\2019 11:28:00 | VAGRANT | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 11:28:00 | VAGRANT | Info | Searching for Ctrl Txt: Install
05\01\2019 11:28:00 | VAGRANT | Info | Timeout: 0
05\01\2019 11:28:00 | VAGRANT | Info | Time Delay (after click): 0

But the EasyLog USB Device Driver Installer dialog remains.
 

Posted (edited)

yeah, get the NEW new code.. LOL

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Global $TD_BTN_NEXT = '&Next >'
Global $TD_BTN_INSTALL = '&Install'
Global $TD_BTN_INSTALL2 = 'Install'
Global $TD_BTN_FINISH = '&Finish'
Global $TD_BTN_CANCEL = 'Cancel'
Global $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Global $TD_BTN_ALTFINISH = '&Finish'
Global $TD_BTN_ALLOW_ACCESS = '&Allow access'
Global $TD_BTN_REMOVE = '&Remove'
Global $TD_BTN_YES = '&Yes'
Global $TD_BTN_OK = 'OK'
Global $TD_BTN_TYPICAL = '&Typical'
Global $TD_EDIT_DATA = '99999'
Global $TD_TREE_NAME = 'Tree1'

Global $apptext = 'EasyLog USB Device Driver Installer'
Global $text = "EasyLog USB - InstallShield Wizard"
Global $class = "[CLASS:MsiDialogCloseClass]"
Global $stdClass = '[Class:#32770]'
Global $button1 = "[CLASS:Button; INSTANCE:1]"
Global $button2 = "[CLASS:Button; INSTANCE:2]"
Global $button3 = "[CLASS:Button; INSTANCE:3]"
Global $button4 = "[CLASS:Button; INSTANCE:4]"
Global $button5 = "[CLASS:Button; INSTANCE:5]"

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Local $handle = WinActivate($text)
    _log4a_Info($handle)
    _log4a_Info('Begin Install()')
    _checkClickCtrl($class, $text, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button3, $TD_BTN_IAGREE, 0)
    _checkClickCtrl($class, $text, $button5, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_INSTALL, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_FINISH, 0)
    _checkClickCtrl($stdClass, $apptext, $button1, $TD_BTN_INSTALL2, 0)
    _checkClickCtrl($stdClass, 'Success', $button1, $TD_BTN_OK, 0, 3)

    _log4a_Info('End Install()')

EndFunc

Install()

And THAT is how you automate installers.... I love my wait for controls function with professional logging. you can also make the button text Const and the buttons too for that matter, no need for Global like so

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Const $TD_BTN_NEXT = '&Next >'
Const $TD_BTN_INSTALL = '&Install'
Const $TD_BTN_INSTALL2 = 'Install'
Const $TD_BTN_FINISH = '&Finish'
Const $TD_BTN_CANCEL = 'Cancel'
Const $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Const $TD_BTN_ALTFINISH = '&Finish'
Const $TD_BTN_ALLOW_ACCESS = '&Allow access'
Const $TD_BTN_REMOVE = '&Remove'
Const $TD_BTN_YES = '&Yes'
Const $TD_BTN_OK = 'OK'
Const $TD_BTN_TYPICAL = '&Typical'
Const $TD_EDIT_DATA = '99999'
Const $TD_TREE_NAME = 'Tree1'

Const $apptext = 'EasyLog USB Device Driver Installer'
Const $text = "EasyLog USB - InstallShield Wizard"
Const $class = "[CLASS:MsiDialogCloseClass]"
Const $stdClass = '[Class:#32770]'
Const $button1 = "[CLASS:Button; INSTANCE:1]"
Const $button2 = "[CLASS:Button; INSTANCE:2]"
Const $button3 = "[CLASS:Button; INSTANCE:3]"
Const $button4 = "[CLASS:Button; INSTANCE:4]"
Const $button5 = "[CLASS:Button; INSTANCE:5]"

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Local $handle = WinActivate($text)
    _log4a_Info($handle)
    _log4a_Info('Begin Install()')
    _checkClickCtrl($class, $text, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button3, $TD_BTN_IAGREE, 0)
    _checkClickCtrl($class, $text, $button5, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_INSTALL, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_FINISH, 0)
    _checkClickCtrl($stdClass, $apptext, $button1, $TD_BTN_INSTALL2, 0)
    _checkClickCtrl($stdClass, 'Success', $button1, $TD_BTN_OK, 0, 3)

    _log4a_Info('End Install()')

EndFunc

Install()

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted (edited)

and i still want those gluten free donuts... LOL 😁 kidding. I had time today to F off, because all my Jira issues are taken care of and in source control.

 

output

Quote

05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | 0x00000000002A023C
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Begin Install()
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():Begin
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Ctrl Txt: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Search: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Found: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Ctrl Txt: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():End
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():Begin
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Control: [CLASS:Button; INSTANCE:3]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Ctrl Txt: I &accept the terms in the license agreement
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Search: I &accept the terms in the license agreement
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Found: I &accept the terms in the license agreement
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Control: [CLASS:Button; INSTANCE:3]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Ctrl Txt: I &accept the terms in the license agreement
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | [CLASS:Button; INSTANCE:3]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:3]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():End
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():Begin
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Control: [CLASS:Button; INSTANCE:5]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Ctrl Txt: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Search: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Found: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Control: [CLASS:Button; INSTANCE:5]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Ctrl Txt: &Next >
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | [CLASS:Button; INSTANCE:5]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:5]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():End
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():Begin
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Ctrl Txt: &Install
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Search: &Install
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Control Text Found: &Install
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Found Ctrl Txt: &Install
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():End
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():Begin
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Searching for Ctrl Txt: &Finish
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:19 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Control Text Search: &Finish
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Control Text Found: &Finish
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Formclass: [CLASS:MsiDialogCloseClass]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Text: EasyLog USB - InstallShield Wizard
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Ctrl Txt: &Finish
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():End
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():Begin
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Formclass: [Class:#32770]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Text: EasyLog USB Device Driver Installer
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Ctrl Txt: Install
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Control Text Search: Install
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Control Text Found: Install
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Formclass: [Class:#32770]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Text: EasyLog USB Device Driver Installer
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Ctrl Txt: Install
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():End
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():Begin
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Formclass: [Class:#32770]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Text: Success
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Searching for Ctrl Txt: OK
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 3
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Control Text Search: OK
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Control Text Found: OK
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Formclass: [Class:#32770]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Text: Success
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Control: [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Found Ctrl Txt: OK
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Timeout: 0
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | Time Delay (after click): 3
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | ExitLoop:Normal - [CLASS:Button; INSTANCE:1]
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | _checkClickCtrl():End
05\01\2019 14:43:21 | WIN-2TDB8MS8L27 | Info | End Install()
+>14:43:21 AutoIt3.exe ended.rc:0
+>14:43:21 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 3.21
 

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted (edited)
#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Global $TD_BTN_NEXT = '&Next >'
Global $TD_BTN_INSTALL = '&Install'
Global $TD_BTN_INSTALL2 = 'Install'
Global $TD_BTN_FINISH = '&Finish'
Global $TD_BTN_CANCEL = 'Cancel'
Global $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Global $TD_BTN_ALTFINISH = '&Finish'
Global $TD_BTN_ALLOW_ACCESS = '&Allow access'
Global $TD_BTN_REMOVE = '&Remove'
Global $TD_BTN_YES = '&Yes'
Global $TD_BTN_OK = 'OK'
Global $TD_BTN_TYPICAL = '&Typical'
Global $TD_EDIT_DATA = '99999'
Global $TD_TREE_NAME = 'Tree1'

Global $apptext = 'EasyLog USB Device Driver Installer'
Global $text = "EasyLog USB - InstallShield Wizard"
Global $class = "[CLASS:MsiDialogCloseClass]"
Global $stdClass = '[Class:#32770]'
Global $button1 = "[CLASS:Button; INSTANCE:1]"
Global $button2 = "[CLASS:Button; INSTANCE:2]"
Global $button3 = "[CLASS:Button; INSTANCE:3]"
Global $button4 = "[CLASS:Button; INSTANCE:4]"
Global $button5 = "[CLASS:Button; INSTANCE:5]"

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Local $handle = WinActivate($text)
    _log4a_Info($handle)
    _log4a_Info('Begin Install()')
    _checkClickCtrl($class, $text, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button3, $TD_BTN_IAGREE, 0)
    _checkClickCtrl($class, $text, $button5, $TD_BTN_NEXT, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_INSTALL, 0)
    _checkClickCtrl($class, $text, $button1, $TD_BTN_FINISH, 0)
    _checkClickCtrl($stdClass, $apptext, $button1, $TD_BTN_INSTALL2, 0)
    _checkClickCtrl($stdClass, 'Success', $button1, $TD_BTN_OK, 0, 3)

    _log4a_Info('End Install()')

EndFunc

Install()

The above code does not work for me 😞 The device driver dialog remains in the screen and the install doesn't finish.

Does this video I made help?

Gladly look for donuts for you 🙂 

Edited by basictheprogram

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...