In case Setup.exe is password-protected, the user must specify the password with the /p argument at run time. A typical command is:
Setup.exe /s /p"password"
In order to run installation program in silent mode, one must first run Setup.exe with the /r switch to generate a response file, which stores information about the data entered and options selected by the user at run time. Running a Setup.exe with the command:
Setup.exe /r /f1"c:\temp\Setup.iss"
displays all the run-time dialog boxes, and stores the data in a file called Setup.iss, generated inside the system's Windows folder. To specify an alternative response file name and location, use the /f1 argument, described below.
The /s switch runs the installation in silent mode, by default based on the responses contained in a response file called Setup.iss in the same directory (response files are created by running Setup.exe with the /r option).
Following command suppresses the Setup.exe initialization window for a MSI installation program, but does not read a response file:
Setup.exe /s /SMS
Setup.exe /s /f1"c:\temp\Setup.iss"
Setup.exe /s /f1"c:\temp\Setup.iss" /f2"c:\temp\my-log-file.iss"
To run a MSI product silently, run the command line:
Setup.exe /s /v"/qn"
To specify the values of public properties for a silent MSI installation, you can use a command such as:
Setup.exe /s /v"/qn INSTALLDIR=D:\Destination"
If you would like to use a long file name, use the following example format:
Setup.exe /s /v"/qn INSTALLDIR=\"C:\Program Files\SampleCo\TestApp\""
Alternative Response File Location
The /f1 switch allows one to specify where the response file is (or where it should be generated) and what its name is, as in:
Setup.exe /s /f1"C:\Temp\Setup.iss"
This switch is available both when creating a response file (with the /r option) and when using a response file (with the /s option).
Alternative Log File Location
When running a Setup.exe installation program in silent mode (using the /s argument), the log file Setup.log is generated by default in the same directory as the response file. The /f2 argument allows one to specify an alternative log file location and file name, as in:
Setup.exe /s /f2"C:\Setup.log"