I've created a program that automates software installs locally and offline. This year, I wanted to clean my code and learn how to create string values instead of a separate script for every single thing. I've been staring at the AutoIt help file for about 6 hours now and everything I try doesn't work. If I could just see my one script work, I'm positive I can get the rest of them to do the same.
;Require admin so there are no file permission errors.
;2024
#RequireAdmin
#include <Process.au3>
#include <MsgBoxConstants.au3>
Local $reader64 = "Run(@ScriptDir & "\Adobe Reader\AcroRdrDCx642300620360_en_US.exe")
WinWait ("Adobe Acrobat Reader DC (Continuous) - Setup", "Adobe Acrobat is configured to install updates");Wait for the first window.
WinActivate ("Adobe Acrobat Reader DC (Continuous) - Setup", "Adobe Acrobat is configured to install updates");Activate the window.
ControlClick ("Adobe Acrobat Reader DC (Continuous) - Setup", "Adobe Acrobat is configured to install updates", "Button6");Click Install.
WinWait ("Adobe Acrobat Reader DC (Continuous) - Setup", "Setup has successfully installed");Wait for the second window.
WinActivate ("Adobe Acrobat Reader DC (Continuous) - Setup", "Setup has successfully installed");Activate the window.
ControlClick ("Adobe Acrobat Reader DC (Continuous) - Setup", "Setup has successfully installed", "Button2")"
Local $readerxp = Run(@ScriptDir & "\Adobe Reader\AdbeRdr11008_en_US.exe")
WinWait ("Adobe Reader XI (11.0.08) - Setup", "Ready to Install Adobe Reader");Wait for the first window.
WinActivate ("Adobe Reader XI (11.0.08) - Setup", "Ready to Install Adobe Reader");Activate the window.
ControlClick ("Adobe Reader XI (11.0.08) - Setup", "Ready to Install Adobe Reader", "Button1");Click next.
WinWait ("Adobe Reader XI (11.0.08) - Setup", "Keep your product up-to-date");Wait for the second window.
WinActivate ("Adobe Reader XI (11.0.08) - Setup", "Keep your product up-to-date");Activate the window.
ControlClick ("Adobe Reader XI (11.0.08) - Setup", "Keep your product up-to-date", "Button8");Do not check for updates.
Sleep(1500)
ControlClick ("Adobe Reader XI (11.0.08) - Setup", "Keep your product up-to-date", "Button1");Click install.
WinWait ("Adobe Reader XI (11.0.08) - Setup", "Setup Completed");Wait for the second window.
WinActivate ("Adobe Reader XI (11.0.08) - Setup", "Setup Completed");Activate the window.
ControlClick ("Adobe Reader XI (11.0.08) - Setup", "Setup Completed", "Button1"); Click finish.
if @OSArch = "X64" Then $reader64
elseIf @OSVersion = "WIN_XP" Then $readerxp
Sleep(2000)
EndIf
Thank you for reading.