SDK Silent Installation (version 1.5.0)


This document includes the following topics:

Notes

  1. This chapter applies to 32-bit Windows and silent installation of the J2SE Software Development Kit (SDK).
  2. In the various command line examples below a space appears between the /v and the quote ("); i.e., /v ". The space is required for 1.4.2_01 and higher releases that are installed by the "Windows Installation" method (aka "install from the web"). For "Windows Offline Installation" no space should appear. See Install Formats for more information about installation types.

Introduction

JavaTM 2 SDK (J2SDK) 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 SDK. 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:

<sdk>.exe /s /v "/qn [ADDLOCAL=ToolsFeature[,DemosFeature][,SourceFeature] [INSTALLDIR=<drive>:\<install_path>] [REBOOT=Suppress]"

where

<sdk>.exe is the single executable installer for the Java 2 SDK; ADDLOCAL, if used, is either ToolsFeature[,DemosFeature][,SourceFeature]; 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=ToolsFeature[,DemosFeature][,SourceFeature] is used,

ToolsFeature  indicates the tools of the J2SDK will be installed;

DemosFeature  (optional) indicates that the J2SDK demos will be installed;

SourceFeature  (optional) indicates that the src.zip file including the j2sdk source will be installed.

If ADDLOCAL is not used, then all of the features will be installed.

If INSTALLDIR is not specified, the installation will go into [WindowsVolume]:Program Files\j2sdk1.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 J2SDK installer is j2sdk-1_5_0-beta-bin-b32-windows-i586-19_dec_2003.exe and you want to install the J2SDK tools and demos.  Then the command would be:

j2sdk-1_5_0-beta-bin-b32-windows-i586-19_dec_2003.exe /s /v "/qn ADDLOCAL=ToolsFeature,DemosFeature"

Or suppose you want all features to be installed, and you want the installation on the D drive at java\j2sdk1.5.0. Then the command line could be simply:

j2sdk-1_5_0-beta-bin-b32-windows-i586-19_dec_2003.exe /s /v "/qn INSTALLDIR=D:\java\j2sdk1.5.0"

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 j2sdk-1_5_0-beta-bin-b32-windows-i586-19_dec_2003.exe /s /v "/qn INSTALLDIR=D:\java\j2sdk1.5.0"

Running InstallShield in Silent Mode: Uninstalling

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

MsiExec.exe /qn /x {32A3A4F4-B792-11D6-A78A-00B0D0n1n2n3n4n50}

Notes

  1. This command can be run from anywhere.
  2. The REBOOT=Suppress option, mentioned above under installation, may also be used with the uninstall command.
  3. For more information on version formats, see Appendix 3: Sun-Supported Specification-Version and Implemenation-Version Formats.

Example for version 1.5.0

MsiExec.exe /qn /x {32A3A4F4-B792-11D6-A78A-00B0D0150000}

Example for version 1.5.1_02

MsiExec.exe /qn /x {32A3A4F4-B792-11D6-A78A-00B0D0151020}

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:

j2sdk-1_5_0-beta-bin-b32-windows-i586-19_dec_2003.exe /s /v "/qn /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.