Tutorials / Windows Unattended / Unattended Application Installation
Modern installers usually have a silent or quient installation switch which allows an unattended install to be performed. Below is a quick guide to unattended application installation:
First try using the /? switch e.g. >setup.exe /? to see if the command line options are detailed.
Next try some of the most common switches:
/s /silent /q /quiet /s /v/qn /passive
InstallShield often recognises the /r switch to record an installation and create an answer file (setup.iss). The /f1 switch allows the answer filename and path to be specified as /f1filename (no space) e.g. /r /f1C:\unattend.iss
Some installers have custom install switches e.g. Adobe Reader 8.0 which accepts /sAll or /sPB (progress bar).
Some installers read config files which are in the same directory as the setup file e.g. CyberLink PowerDVD 7.0 which requires silent=1 to be added to custom.ini and EnableLangDlg=N set in setup.ini.
For a more comprehensive explanation of installers and unattended switches follow this link: http://unattended.sourceforge.net/installers.php
When all else fails you can use VBScript to send keystrokes to the application as shown in the example below. Most installers accept ALT-N (%n) for Next, ALT-I (%i) for Install and ALT-F (%f) for Finish but you can experiment to find the right keys. Ensure you leave a time delay long enough for the actual installation stage so that the final keystroke is not lost.
Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run "C:\setup.exe"
Wscript.Sleep 1000 objShell.SendKeys "%n"
Wscript.Sleep 1000 objShell.SendKeys "%n"
Wscript.Sleep 1000 objShell.SendKeys "%n"
Wscript.Sleep 1000 objShell.SendKeys "%n"
Wscript.Sleep 1000 objShell.SendKeys "%i"
Wscript.Sleep 30000 objShell.SendKeys "%f"
Wscript.Echo "Complete"
Please note that a disclaimer applies to any code on this page.
|