Silent Installation

This section discussess silent installation of the Java Runtime Environment (JRE) on Windows 32-bit platform. It is intended for:

The Silent Installation section has the following topics:

Introduction

JavaTM SE Runtime Environment (JRE) installations are built using Microsoft Window Installer (MSI) 2.0 technology. MSI contains built-in support for silent or unattended installations. This document tells how to silently install the JRE using the .exe that launches the MSI installation.

Installation in Silent Mode

In Java SE 6 The Windows offline installation command has the same syntax as the Windows Installation. The command is as follows:

 <jre>.exe   [/lang=<language ID>] /s [ADDLOCAL=jrecore[,extra][,other_US] | ALL] 
[IEXPLORER=1] [MOZILLA=1] [INSTALLDIR=<drive>:\<install_path>]
[REBOOT=Suppress]

where

Note

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

Installation Configurations

Example 1

Suppose the JRE installer is jre-6-rc-windows-i586.exe and you want to install the following configuration:

The command to install the above mentioned configuration is as follows:

jre-6-rc-windows-i586.exe /s ADDLOCAL=jrecore,extra MOZILLA=1

Example 2

Suppose the JRE installer is jre-6-rc-windows-i586.exe and you want to install the following configuration:

The command to install the above mentioned configuration is as follows:

jre-6-rc-windows-i586.exe /s ADDLOCAL=ALL IEXPLORER=1 INSTALLDIR=D:\java\jre"

Note

To keep the MS-DOS window open, until the installation of JRE is complete use the start /w command as follows:

start /w jre-6-rc-windows-i586.exe /s ADDLOCAL=jrecore,extra MOZILLA=1

Uninstallation in Silent Mode

This is the command line for uninstalling in silent mode for Implementation-Version n1.n2.n3_n4n5:

msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0n1n2n3n4n50}

Notes

  1. This command can be run from anywhere.
  2. The msiexec.exe executable is located in the windows system directory.
  3. The REBOOT=Suppress option, mentioned above under installation, may also be used with the uninstall command.
  4. For more information on version formats, see Appendix 2: Sun-Supported Specification-Version and Implementation-Version Formats.

Example for version 1.6.0

msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160000}

Example for version 1.6.0_02

msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160020}

Creating a Log File

Log file can be used to verify if a installation or uninstallation succeeded. To create a log file describing the installation or uninstallation append /L C:\<path>setup.log to the install or uninstall command and scroll to the end of the log file to verify.

Installation Example

The following is an example for installation:

jre-6-rc-windows-i586.exe /s /L C:\<path>setup.log

The above command causes the log to be written to the setup.log file.

Uninstallation Example

The following is an example for uninstalling:

msiexec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160000} /L C:\<path>setup.log