Java Install Silent

From Hack Sphere Labs Wiki
Jump to: navigation, search

The goal is to install Java with no ads. I cannot stand the fact that when you enable the automated Java update in Windows that, when you go to install it after it downloads, it asks you if you would like to install some ad bar. This is a bad policy created by a crappy company. You should not get shit ads with your updates. No Yahoo bar, no ask bar, no whatever.

Full Solution

You can install Java via silent install which I am betting will not install the advertisement bar.

You will need to download offline java @ http://www.java.com/en/download/manual.jsp

Then follow the pasted instructions below or here: http://www.java.com/en/download/help/silent_install.xml

Introduction Java installations are built using Microsoft Windows Installer (MSI) 2.0 technology. MSI contains built-in support for silent or unattended installations. This document tells how to manually install Java using the .exe that launches the MSI installation. The installer options are explained.

Command Line Install 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=] [/s] [IEXPLORER=1] [MOZILLA=1] [INSTALLDIR=:\] [STATIC=1]

Where

  • <jre>.exe is the single executable installer for Java
  • /lang=, if used, sets the localized language for the installer. For a complete list, please see Language IDs.
  • /s, if used, indicates silent installation
  • IEXPLORER=1, if used, indicates that the Plug-in should be registered as the default Java VM with the Internet Explorer browser
  • MOZILLA=1 indicates that the Plug-in should be registered with Mozilla 1.1 and later and Netscape browsers
  • INSTALLDIR, if used, specifies the drive and path of the installation
  • If INSTALLDIR is not specified, the installation will go into C:\Program Files\java\jre1.6.0 (default location).
  • STATIC=1, if used, specifies a static installation. This option is available in the 6u10 release and above. For more information on static install, please see . Java Runtime Environment Configuration.
Note: The following options have been deprecated starting in release Java SE 6 update 10
  • ADDLOCAL
  • IEXPLORE
  • MOZILLA
Note: Beginning in Java SE 6 update 10 release, the latest Java software will be registered with all browsers. This ensures that applets will run on the latest and most secure version of Java software

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

  • Perform a Windows Installation
  • Install the JRE core, additional fonts, colors, and Soundbank
  • Register the Plug-in with Netscape 7 and Mozilla 1.3

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

jre-6-rc-windows-i586.exe /s MOZILLA=1

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

  • Perform a Windows Offline Installation and install the JRE on D drive at java\jre
  • Have all features of the JRE installed
  • Register the Plug-in with Internet Explorer

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

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

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

start /w jre-6-rc-windows-i586.exe /s MOZILLA=1

Creating a Log File Log file can be used to verify if an installation succeeded. To create a log file describing the installation append /L C:\setup.log to the install 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:\setup.log

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

Summary Solution

  1. Download: http://www.java.com/en/download/manual.jsp
  2. Install with command switches:
start /w jre.exe /s /L output_log.log