Silent Installation



This section includes the following topics:

Notes

  1. This chapter applies to 32-bit Windows and silent installation of the Java Runtime Environment (JRE).
  2. It is intended for:
    • system administrators who want to deploy Java Plug-in and the JRE on multiple PCs in the Intranet environment without user interaction;
    • companies with products that require the JRE, which they can silently install with their product.

Introduction

JavaTM 2 Platform Runtime Environment (JRE) installations are built using InstallShield Developer 7, which is based on Microsoft Window Installer. This product contains built-in support for silent or unattended installations. This document tells how to silently install the JRE. Refer to  http://support.installshield.com/ for complete information about silent installations.

Running InstallShield in Silent Mode: Installation

Here is the command line for installing in silent mode:

<jre>.exe /s /v"/qn [ADDLOCAL=jrecore[,extra][,other_US] | ALL] [IEXPLORER=1] [NETSCAPE6=1] [MOZILLA=1] [INSTALLDIR=<drive>:\<install_path>][REBOOT=Suppress]"

where

<jre>.exe is the single executable installer for the Java Runtime Environment (JRE); ADDLOCAL, if used, is either jrecore[,extra][,other_US] or ALL; IEXPLORER=1, if used, indicates that the Plug-in should be registered with the Internet Explorer browser; NETSCAPE6=1, if used, indicates that the Plug-in should be registered with Netscape 6 or later browsers; MOZILLA=1 indicates that the Plug-in should be registered with Mozilla 1.1 and later browsers; INSTALLDIR, if used, specifies the drive and path of the installation; and REBOOT=Suppress, if used, indicates that if locked files are encountered the computer should not be rebooted.

If ADDLOCAL=jrecore[,extra][,other_US] is used,

jrecore indicates the core of the JRE will be installed;

extra (optional) indicates additional Fonts, Colors, and Soundbank will be installed;

other (optional) indicates locale-specific .jar files will be installed.

If ADDLOCAL=ALL is used, then all the features will be installed.

If ADDLOCAL is not used, then only the recommended features will be installed: jrecore will be installed; extra will not be installed; other will be installed only if l10n support, other than English, is installed.

If INSTALLDIR is not specified, the installation will go into C:\Program Files\java\j2re1.4.2 (default location).

Note

The command is case sensitive and there must be no spaces in the features listed with ADDLOCAL.

Examples

Suppose the JRE installer is j2re-1_4_2-bin-b18-windows-i586-05_mar_2003.exe; you want to install the JRE core and additional Fonts, Colors and Soundbank; and you want to register the Plug-in with Netscape 7 and Mozilla 1.3. Then the command would be:

j2re-1_4_2-bin-b18-windows-i586-05_mar_2003.exe /s /v"/qn ADDLOCAL=jrecore,extra NETSCAPE=1 MOZILLA=1"

Or suppose you want all features to be installed; you only want to register the Plug-in with Internet Explorer; and you want the installation on the D drive at java\jre. Then the command line could be simply:

j2re-1_4_2-bin-b18-windows-i586-05_mar_2003.exe /s /v"/qn ADDLOCAL=ALL IEXPLORER=1 INSTALLDIR=D:\java\jre"

You may find it convenient to use the "start /w" command, as that will cause MS-DOS to wait until the install is complete. For example:

start /w j2re-1_4_2-bin-b18-windows-i586-05_mar_2003.exe /s /v"/qn ADDLOCAL=ALL IEXPLORER=1 INSTALLDIR=D:\java\jre"

Running InstallShield in Silent Mode: Uninstalling

This is the command line for uninstalling in silent mode:

<jre>.exe /s /v"/qn [REBOOT=Suppress]" /x

where <jre>.exe is the single executable installer for the JRE and REBOOT=Suppress, if used, indicates that if locked files are encountered the computer should not be rebooted.

Example

j2re-1_4_2-bin-b18-windows-i586-05_mar_2003.exe /s /v"/qn REBOOT=Suppress" /x

Creating a Log File

If you want to create a log file describing the installation, add /L C:\<path>setup.log to the command. Note that this comes within the quote marks (""). For example:

j2re-1_4_2-bin-b18-windows-i586-05_mar_2003.exe /s/v"/qn ADDLOCAL=ALL /L C:\<path>setup.log"

This will cause the log to be written to the setup.log file.

To verify if a silent installation succeeded, scroll to the end of the log file.