automate software installation

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
need4speed
Posts: 143
Joined: 22 Apr 2016, 06:50

automate software installation

25 Jan 2021, 20:20

meant as a public reply to @SOTE remarks regarding PDQ's AHK video here...

I like to automate a (silent) software installation, nothing fancy, selecting stuff and pressing buttons using a standard graphical deployment software like NSIS.
I want to make it robust; successful actions as well as errors, timeouts, etc. everything should be logged.
Given the code from the video below how would exactly approach this?
After finish, would you check if files/folders/reg keys had been created correctly, or is this not necessary?

As this is a typical AHK case of application for sure s.o. has some useful tips to share. any generic, stable, robust, consistent, easy to adapt code :lol: would be great.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance, Force
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
SetControlDelay, 50
Title := "Uninstall WebEx Software"

Run, WBXRemoveTool.exe ;, Min

; Wait for WebEx Uninstall Window to open
WinWait, % Title, Yes
; Hide the Window
; WinMinimize, % Title, Yes

; Click yes (yes to uninstall)
ControlClick, Button1, % Title, Yes

WinWait, % Title, Uninstall
;Hide the window
;WinMinimize, % Title, Uninstall
; Click Uninstall
ControlClick, Uninstall, % Title, Uninstall

; Loop and wait 1 second until the finished button becomes enabled
Loop {
    Sleep, 1000
    ControlGet, IsFinished, Enabled,, Button2, % Title
} Until IsFinished = 1

; Then click the Finished button
ControlClick, Button2, % Title

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: FortniteSpanishGuy, HiSoKa, mesutakcan, mikeyww and 131 guests