| # Silent Installation |

Silent Installation includes the following topics:

Introduction Installation in Silent Mode Uninstallation in Silent Mode Creating a Log File

Notes This chapter applies to 32-bit Windows and silent installation of the Java Runtime Environment (JRE). 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. For the "Windows Installation" method (aka "install from the web"), only the `/s` option is required. For "Windows Offline Installation," you must include `/s /v"/qn`. See Install Formats for more information about installation types. There is no `WEBSTARTICON=0` command-line option below, as there is for version 1.4.2. That is because version 1.5.0 (also known as 5.0) does not create a Java Web Start icon.

## Introduction

JavaTM 2 Platform Runtime Environment (JRE) installations are built using InstallShield Developer 8.02, which is based on Microsoft Window Installer 2.0. 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.

## Installation in Silent Mode

Here is the command line for installing in silent mode:

> #### Window Installation:

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

> #### Windows Offline Installation:

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

where

`<jre>.exe` is the single executable installer for the Java Runtime Environment (JRE); `/L<language ID>`, if used, sets the localized language for the installer (see language IDs); `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; `REBOOT=Suppress`, if used, indicates that if locked files are encountered the computer should not be rebooted; `JAVAUPDATE=0`, if used, indicates that the Java Update feature should be disabled (the Update tab in the Java Control Panel will not appear); and if `CUSTOM=1` is used, the user will only see the license agreement, which must be accepted, and the progress bar.

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\jre1.5.0` (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 `jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe`; you want to install the JRE core and additional Fonts, Colors and Soundbank; you want to register the Plug-in with Netscape 7 and Mozilla 1.3; and you want to do a Windows Installation. Then the command would be:

> `jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe /s 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; you want the installation on the `D` drive at `java\jre`; and you want to do a Windows Offline Installation. Then the command line would be:

> `jre-1_5_0-bin-b99-windows-i586-12_aug_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. The first example would then be:

> `start /w jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe /s ADDLOCAL=jrecore,extra NETSCAPE=1 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 This command can be run from anywhere. The `REBOOT=Suppress` option, mentioned above under installation, may also be used with the uninstall command. For more information on version formats, see Appendix 2: Sun-Supported `Specification-Version` and `Implemenation-Version` Formats.

#### Example for version 1.5.0

> `MsiExec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}`

#### Example for version 1.5.1_02

> `MsiExec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0151020}`

## Creating a Log File

If you want to create a log file describing the installation/uninstallation, append `/L C:\<path>setup.log` to the install/uninstall command. The following is an example for installation:

#### Installation Example

> `jre-1_5_0-bin-b99-windows-i586-12_aug_2003.exe /s /L C:\<path>setup.log`

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

The following is an example for uninstalling:

#### Uninstalling Example

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

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