Announcement

Collapse
No announcement yet.

Automating Software Installation with AutoIt

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Automating Software Installation with AutoIt

    From a discussion that started in PB for Windows:
    I often install multiple apps like Everything on PCs for various users. It doesn't take long, just a lot of pressing buttons to accept the defaults - doing that for each of the apps I want to install. But as simple as that might be, I still want a way to automate the process - where the user approves the installation but after


    Originally posted by Gary Beene View Post
    Howdy, Stuart!

    Thanks for the suggestion. I've not used AutoIt before but on a quick read, it appears that I can create an installation script for apps like Everything then save the script as an EXE to run on a user's PC. AutoIt does not have to be installed on the user's PC. Sounds good.

    I'd much rather go with a time-tested solution than have to write my own!

    I'll give it a try and post the results.
    This script compiled with Aut2exe.exe works for me.
    Code:
    #include <Constants.au3>
    
    _Everything()
    Exit
    ; Finished!
    
    Func _Everything()
        Local $iAnswer = MsgBox(BitOR($MB_YESNO, $MB_SYSTEMMODAL), "Everything Installer", "This script will instal Everything.  Do you want to run it?")
        If $iAnswer = $IDNO Then
            MsgBox($MB_SYSTEMMODAL, "AutoIt", "OK.  Bye!")
            Return
        EndIf
    
        ; Run Everything Installer
        ;Title,Unique Text: All pages have the same Title, look for unique text on each wizard page
        Run("Everything-1.4.1.1022.x64-Setup.exe")
        WinWaitActive("Everything Setup","select the language",2) ;initial language selection - accept default English US
        Send("{ENTER}")
        WinWaitActive("Everything Setup","License Agreement",2)
        Send("{ENTER}") ;Accept
        WinWaitActive("Everything Setup","Choose Install Location",2)
        Send("!n") ;Next (Alt N)- accept default
        WinWaitActive("Everything Setup","Settings and data location",2) ;Installation Options
        Send("!n")    ;Next  (Alt N) - accept defaults
        WinWaitActive("Everything Setup","Check for updates on startup",2) ;Additional install Options
        Send("!i")
        WinWaitActive("Everything Setup","Completing Everything Setup",2) ;Finish
        Send("!r")  ;Toggle OFF "Run Everything
        Send("!f")  ;Finish
    EndFunc
    ​​​
    =========================
    https://camcopng.com
    =========================
Working...
X
😀
🥰
🤢
😎
😡
👍
👎