darkaira Posted June 27, 2014 Posted June 27, 2014 Having problem with controlclick. Was trying to automate a software install but cant seem to get controlclick to function. Still stuck at the first setup screen . Can someone help me I am new to autoit. Here is my code and the summary of the window setup page: If FileExists(@ProgramFilesDir &"\4Team Corporation\Safe PST Backup\SafePSTBackup.exe") Then Exit Else ; RunAs("administrator","domain.Local","password", 0, "\pst backup\safepstbackup_setup.exe") Run("safepstbackup_setup.exe") sleep(3000) WinWait("4Team Safe PST Backup Free Edition - InstallShield Wizard","Welcome to the InstallShield Wizard for 4Team Safe PST Backup Free Edition") WinActive("4Team Safe PST Backup Free Edition - InstallShield Wizard","English (United States)") ControlClick("4Team Safe PST Backup Free Edition - InstallShield Wizard","English (United States)", 1) WinWait("4Team Safe PST Backup Free Edition - InstallShield Wizard","Welcome to the InstallShield Wizard for 4Team Safe PST Backup Free Edition") WinActivate("4Team Safe PST Backup Free Edition - InstallShield Wizard","Welcome to the InstallShield Wizard for 4Team Safe PST Backup Free Edition") ControlClick("4Team Safe PST Backup Free Edition - InstallShield Wizard","Welcome to the InstallShield Wizard for 4Team Safe PST Backup Free Edition", 2185) WinWait("4Team Safe PST Backup Free Edition - InstallShield Wizard","License Agreement") WinActivate("4Team Safe PST Backup Free Edition - InstallShield Wizard","License Agreement") ControlClick("4Team Safe PST Backup Free Edition - InstallShield Wizard","License Agreement", 2090) ControlClick("4Team Safe PST Backup Free Edition - InstallShield Wizard","License Agreement", 2185) WinWait("4Team Safe PST Backup Free Edition - InstallShield Wizard","InstallShield Wizard Completed") WinActivate("4Team Safe PST Backup Free Edition - InstallShield Wizard","InstallShield Wizard Completed") ControlClick("4Team Safe PST Backup Free Edition - InstallShield Wizard","InstallShield Wizard Completed", 2184) ControlClick("4Team Safe PST Backup Free Edition - InstallShield Wizard","InstallShield Wizard Completed", 2209) EndIf Exit >>>> Window <<<< Title: 4Team Safe PST Backup Free Edition - InstallShield Wizard Class: #32770 Position: 616, 255 Size: 384, 156 Style: 0x94C808C4 ExStyle: 0x00010101 Handle: 0x00000000002E026A >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 Name: Advanced (Class): [CLASS:Button; INSTANCE:1] ID: 1 Text: &OK Position: 212, 94 Size: 75, 23 ControlClick Coords: 13, 2 Style: 0x50010000 ExStyle: 0x00000004 Handle: 0x000000000027028A >>>> Mouse <<<< Position: 844, 376 Cursor ID: 0 Color: 0x030303 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< English (United States) &OK Cancel Select the language for the installation from the choices below. >>>> Hidden Text <<<<
jguinch Posted June 27, 2014 Posted June 27, 2014 You should make this installation from the MSI file instead of the original executable, so you will be able to make a silent installation easily. To extract the MSI file, just launch the safepstbackup_setup.exe and wait for the "Weclome in the Installshield Wizard" page : so you can close the wizard (without continuing) MSI and MST files are extracted into C:ProgramDataDownloaded Installations4Team{XXXXXXX...} : copy the two files in you script directory. Now, you can just use something like Run(@Systemdir & "msiexec.exe /i 4team_safepstbackup_free_x86.msi /TRANSFORMS=1036.MST /qb", @ScriptDir) to make the automate the installation properly. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
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