Installation

Note: Java 64-bit is only necessary if you use IE 64-bit (by default, Internet Explorer is 32-bit even on a 64-bit OS).

Download link: Download Java

Steps to Package Java < v111

  1. Install Java using setup.exe on a machine.
  2. Navigate to C:\Users\%username%\AppData\LocalLow\Sun\Java.
  3. Retrieve the MSI for Java.

Steps to Package Java > v111

  1. Launch the installer without clicking “Install”.
  2. Navigate to C:\Users\%username%\AppData\LocalLow\Oracle\Java\jre1.8.0_121.
  3. Retrieve the MSI for Java.

Disable Java Update via Registry

For x86 OS and Java 32-bit

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]
"EnableJavaUpdate"=dword:00000000
"EnableAutoUpdateCheck"=dword:00000000
"NotifyDownload"=dword:00000000

For x64 OS and Java 32-bit

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy]
"EnableJavaUpdate"=dword:00000000
"EnableAutoUpdateCheck"=dword:00000000
"NotifyDownload"=dword:00000000

Installation Command

if "%PROCESSOR_ARCHITECTURE%"=="x86" goto archix86
:archix64
msiexec /i "%~dp0jre1.7.0_45\jre1.7.0_45.msi" /qn AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1
msiexec /i "%~dp0jre1.7.0_45_x64\jre1.7.0_45.msi" /qn AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1
regedit /s "%~dp0Update_x64.reg"
goto fin

:archix86
msiexec /i "%~dp0jre1.7.0_45\jre1.7.0_45.msi" /qn AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1

:fin
regedit /s "%~dp0Update_x86.reg"

Java Package with Security Level

You can configure Java’s security level during installation using the parameter:

WEB_JAVA_SECURITY_LEVEL=M

Example:

msiexec /i "%~dp0jre1.7.0_65.msi" TRANSFORMS="%~dp0JavaJRE_1.7.65_x86_MUI.mst" WEB_JAVA_SECURITY_LEVEL=M /qb /norestart

Note: The security level configuration in the file C:\Users\%username%\AppData\LocalLow\Sun\Java\Deployment\deployment.properties takes precedence over the machine configuration.

https://github.com/DavidWuibaille/Packaging/tree/main/SilentInstall/JRE


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.