Using a silent install for deployment

Silent installs run without user input and with no indication to the user that an install is occurring. On Windows operating systems, you can call the SQL Anywhere installer from your own install program in such a way that the SQL Anywhere install is silent.

The common options for the SQL Anywhere install program setup.exe are:

  • /L:language_id   The language identifier is a locale number that represents the language for the install. For example, locale ID 1033 identifies U.S. English, locale ID 1031 identifies German, locale ID 1036 identifies French, locale ID 1041 identifies Japanese, and locale ID 2052 identifies Simplified Chinese.

  • /S   This option hides the initialization window. Use this option in conjunction with /V.

  • /V   Specify parameters to MSIEXEC, the Microsoft Windows Installer tool.

The following command line example assumes that the install image directory is in the software\SQLAnywhere directory on the disk in drive d:.

d:\software\sqlanywhere\setup.exe /l:1033 /s "/v: /qn 
    REGKEY=QEDEV-B888A-6L123-45678-90123 INSTALLDIR=c:\sa12 DIR_SAMPLES=c:\sa12\Samples"
Note

The setup.exe in the command above is the one located in the same directory as the SQLANY32.msi and SQLANY64.msi files. The setup.exe in the parent directory of those files does NOT support silent installs.

The following properties apply to the SQL Anywhere installer:

  • INSTALLDIR   The value of this parameter is the path to where the software is installed.

  • DIR_SAMPLES   The value of this parameter is the path to where the sample programs are installed.

  • DIR_SQLANY_MONITOR   The value of this parameter is the path to where the SQL Anywhere Monitor database (samonitor.db) is installed.

  • USERNAME   The value of this parameter is the user name to record for this installation (for example, USERNAME=\"John Smith\").

  • COMPANYNAME   The value of this parameter is the company name to record for this installation (for example, COMPANYNAME=\"Smith Holdings\").

  • REGKEY   The value of this parameter must be a valid software registration key.

  • REGKEY_ADD_1   The value of this parameter must be a valid software registration key for an add-on feature such as ECC or FIPS encryption. This property applies only if you have optional add-on features to be installed during this run of the installer.

  • REGKEY_ADD_2   The value of this parameter must be a valid software registration key for an add-on feature such as ECC or FIPS encryption. This property applies only if you have optional add-on features to be installed during this run of the installer.

  • REGKEY_ADD_3   The value of this parameter must be a valid software registration key for an add-on feature such as ECC or FIPS encryption. This property applies only if you have optional add-on features to be installed during this run of the installer.

The following example shows how to specify the SQL Anywhere install properties:

d:\software\sqlanywhere\setup.exe /S "/v: /qn 
USERNAME=\"John Smith\" 
COMPANYNAME=\"Smith Holdings\" 
REGKEY=QEDEV-B888A-6L123-45678-90123 
REGKEY_ADD_1=<an add-on software registration key> 
REGKEY_ADD_2=<another add-on software registration key> 
INSTALLDIR=c:\sa12 
DIR_SAMPLES=c:\sa12\Samples 
DIR_SQLANY_MONITOR=c:\sa12\Monitor"

Although the above text is shown over several lines for reasons of length, it would be specified as a single line of text. Note the use of the backslash character to escape the interior quotation marks.

The following properties apply to the SQL Anywhere Monitor installer:

  • INSTALLDIR   The value of this parameter is the path to where the software is installed.

  • DIR_SQLANY_MONITOR   The value of this parameter is the path to where the SQL Anywhere Monitor database (samonitor.db) is installed.

  • REGKEY   The value of this parameter must be a valid software installation key.

  • REGKEY_ADD_1   The value of this parameter must be a valid software installation key for an add-on feature such as ECC or FIPS encryption. This property applies only if you have optional add-on features to be installed during this run of the installer.

  • REGKEY_ADD_2   The value of this parameter must be a valid software installation key for an add-on feature such as ECC or FIPS encryption. This property applies only if you have optional add-on features to be installed during this run of the installer.

The following example shows how to specify the SQL Anywhere Monitor install properties:

d:\software\monitor\setup.exe /S "/v: /qn 
REGKEY=<SQLAnywhere Monitor registration key> 
REGKEY_ADD_1=<an add-on software registration key> 
REGKEY_ADD_2=<another add-on software registration key> 
INSTALLDIR=c:\sa12"

In addition to setting the property values described above, the following SQL Anywhere components or features may be selected from the command-line:

Feature Property
Administration Tools (32-bit) AT32
Administration Tools (64-bit) AT64
CAC Authentication CAC *
ECC Strong Encryption ECC *
FIPS-approved Strong Encryption FIPS *
High Availability HA *
In-Memory Mode IM *
MobiLink (32-bit) ML32
MobiLink (64-bit) ML64
QAnywhere QA32
Read-only scale-out SON *
Relay Server (32-bit) RS32
Relay Server (64-bit) RS64
Samples SAMPLES
SQL Anywhere (32-bit) SA32
SQL Anywhere (64-bit) SA64
SQL Anywhere for Windows Mobile MOBILE
SQL Anywhere Monitor (32-bit) SM32
SQL Anywhere Monitor (64-bit) SM64
SQL Remote (32-bit) SR32
SQL Remote (64-bit) SR64
UltraLite UL

* These features require an additional appropriate software registration key.

Set the property value to 1 to select the feature or to 0 to omit the feature. For example, to omit 32-bit MobiLink, set ML32=0. To select the 32-bit Administration Tools, set AT32=1. These properties are used to override the default selection.

You don't need to specify the selection state of a feature if the default is applicable. For example, to override the default selection on a 64-bit computer by installing the 32-bit MobiLink feature and not installing the Samples, use the following command line:

setup.exe "/v ml32=1 samples=0"

Note that property names are case insensitive.

Note that your registration key may limit the available features. The command-line switches cannot be used to override those limitations. For example, if your registration key does not allow the install of ECC Strong Encryption, then using ECC=1 on the command-line will not select the feature.

To generate an MSI log add the following to the command line after the /v:.

/l*v! logfile

In this example, logfile is the full path and file name of the log file. The path must already exist. Note that this switch will generate an extremely verbose log and will significantly lengthen the time required to execute the install. For information about reducing the output to the log file, see [external link] http://msdn.microsoft.com/en-us/library/aa367988.aspx.

In addition to a silent install, it is also possible to perform a silent uninstall. The following is an example of a command line that would do this.

msiexec.exe /qn /uninstall {1DFA77E6-91B2-4DCC-B8BE-98EA70705D39}

In the above example, you call the Microsoft Windows Installer tool directly.

  • /qn   This parameter tells the Microsoft Windows Installer to operate in the background with no user interaction.

  • /uninstall <product-code>   This parameter tells the Microsoft Windows Installer to uninstall the product associated with the specified product code. The code shown above is for the SQL Anywhere software.

The product codes for SQL Anywhere are:

  • {1DFA77E6-91B2-4DCC-B8BE-98EA70705D39}   SQL Anywhere software

  • {A8429447-7813-4717-9803-EB505ECAE698}   SQL Anywhere Client-only software

  • {2E34270B-A38A-4C97-986F-0FC4BBEBA181}   SQL Anywhere Monitor