Un nou blog marca Queen Soft

Automatically/unattended install programs




Watch this short clip. See how Winamp is installed automatically, with no user intervention, in less than 30 seconds?!

This is acomplished with the help of a powerful scripting language, AutoIt.
If you already know some programming, any language, it's very easy to learn the syntax.
The program also has a recording tool, will discuss that ater on.
Using the Winamp example above, I'll explain a few options used in this script.
The other options, not covered here, are self explanatory or not that important.
You can download the script here:
Mirror 1
Mirror 2
Mirror 3
Run("winamp552_full_emusic-7plus_en-us.exe")

This is the name of the setup file of out program. For newer versions, you can either modify the script or just rename the new file like the old one.
You need to have the compiled EXE script and program setup file in the same folder

WinWait("Installer Language", "Please select a language.")

Wait for a particular window to be displayed. First argument (Installer Language) is the name of the window, second argument (Please select a language.) is some text appearing inside the window.

Send("{ENTER}")

Send Enter key to that window.
If you've noticed, almost all install program can be used without a mouse, just with a keyboard. Just press Enter > Enter > Enter > till the end. Sometimes you need Atl+A (Accept the License Agreement) or other key combinations.
Do a manual run of the install sequence before making the script.
ControlClick("Winamp Installer", "Choose Start Options","Button5")

Click a button/option, in our case, disable creation of Desktop and Quick launch shortcuts.

You can get the button names using the Au3Info.exe utility, included in the standard AutoIt setup package. More on that later on.
Now, after finishing the script, you need to compile it, in order to get the EXE program.
This is done with the Aut2Exe utility.

Just enter the source AU3 file and final EXE file and press Convert.
Now put the compiled script in the same folder as setup program and test it.
Another quick tutorial about compiling scripts can be found here.