I'm trying to automate installation process of a software, but AutoIt is not clicking NEXT button. the only script I wrote is
MouseClick ( "LEFT",1088,725,3,10)
please help me.
What kind of installer / software is this; a setup.exe, MSI (Windows Installer) or something else?
Subjective opinion: AutoIt can be fascinating - sort of like a universal remote control, but it is a last resort. At least in the shape it was last time I tried it. It got the job done for me a few times - but just barely, and never reliably. As I said to a friend; badly used AutoIt scripts and executables are the scourge of society! :-).
Seriously: Using Send()
and MouseClick()
and various black magic via AutoIt is not a reliable approach in my opinion - there are too many ways it can fail. I only used it when requirements were adamant and insistent - to the degree where a less-than-ideal solution was the only option. AutoIt use might be very clever, but it is in my opinion not very smart. Humorously: "The man had a problem, he solved it using AutoIt - now he as two problems".
Let me be very concrete: some of the stuff done by these scripts border on malware behavior and may trigger security software interference - if not right now, then potentially during "malware year 2018". Your solution may backfire. Don't be surprised if your AutoIt scripts are suddenly quarantined without warning. Success depends on how large your distribution or solution really is - if you are doing something very fancy for a few users, then maybe. If it is large scale: I wouldn't use it.
If you are actually automating software installation (I am not sure you are), then you should use the silent install command line option for the installer in question. Some have standardized and powerful command line options, such as MSI files (Windows Installer). The commonly seen setup.exe
files may be wrappers for embedded MSI files, or legacy style installers with custom command line options - it all depends. Rather than trying to answer this - yet again, I will point to a couple of similar questions / answers with some resources for you to peruse (the first link in the top answer below may be a good quick-guide - the unattended write-up):
Similar questions:
The two links above should help figure out what command line arguments you need. A few extra:
Maybe give that a go and see if you find the information you need. No offense to AutoIt - it is a cool and feature-packed toy - but it is too unreliable for large scale use. And on my network it would likely be blocked for security reasons.
A QA team testing applications using AutoIt, may be allowed to use it. Maybe there are new features available that makes testing more reliable, and not prone to the old "something pops up and steals focus" problems (emails arriving and stealing focus, power saving mode engaging, laptop power warning whilst running on battery, windows update dialogs showing up - typical for clean test machines, third party applications showing something unexpected, Windows Installer kicking in, etc...).