Deploying Java 8 Runtime - Non UAC Targets - Using Exe

Requirements: Windows target systems must have the SyAM System Client installed and reporting to SyAM System Area Manager. Target systems must be discovered by Management Utility.

**Please Note - Use the MSI method if installing on UAC enabled systems

Installation executables for Java Runtime Environment can be downloaded from the Oracle website:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Click the JRE Download button for the current release. You will need to click the Accept License Agreement radio button to enable downloads. Download the 32-bit and/or 64-bit installer as required. Choose .exe (not .tar.gz) and choose offline (not online) installation files.

Place the installation executable(s) in the default application directory defined on the Administration Settings page of Management Utility. In our example we will install the 64-bit JRE. The 32-bit version can be installed in the same way.

Change the path used in the batch file to use the path to your network share where the java files were downloaded to

Now create the batch file that will handle the removal of the old Java versions, install the new Java Run Time ad disable Auto Updating.

**Please note that the disable auto is 32bit or 64bit specific so use the correct batch file

**Please Note that it is recommended to remove older versions of Java 8 Updates when installing the latest version 


Make the name of the template and batch file generic so you can use the same template each time a new Java update comes out.



Java 8 – i586 Batch File (32-bit)

@ECHO OFF

:: remove current java JRE

START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%6%%Update%%'" call uninstall /nointeractive

START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%7%%Update%%'" call uninstall /nointeractive

START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%8%%Update%%'" call uninstall /nointeractive




:: install 32bit JRE8-upd141

@ECHO OFF

mkdir c:\tmps

xcopy /Y \\192.168.200.46\apps\java\jre-8u141-windows-i586.exe c:\tmps

c:\tmps\jre-8u141-windows-i586.exe /s

rd c:\tmps /S /Q

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::set auto update off

reg QUERY "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy"

if %ERRORLEVEL% EQU 0 (

reg ADD "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy" ^

/v "EnableJavaUpdate" /t REG_DWORD /d 0 /f

)

exit


Java 8 – x64 Batch File (64-bit)

@ECHO OFF

:: remove current java JRE

START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%6%%Update%%'" call uninstall /nointeractive

START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%7%%Update%%'" call uninstall /nointeractive

START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%8%%Update%%'" call uninstall /nointeractive



:: install 64bit JRE8-upd121

@ECHO OFF

mkdir c:\tmps

xcopy /Y \\192.168.200.46\apps\java\jre-8u131-windows-x64.exe c:\tmps

c:\tmps\jre-8u131-windows-x64.exe /s

rd c:\tmps /S /Q

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::set auto update off

reg QUERY "HKLM\SOFTWARE\JavaSoft\Java Update\Policy"

if %ERRORLEVEL% EQU 0 (

reg ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" ^

/v "EnableJavaUpdate" /t REG_DWORD /d 0 /f

)

exit



Save the batch file (in this example, we’ll name the file (JRE8-i586.bat and JRE8-x64.bat) and copy it to the default application directory.

In Management Utility, create a Third Party template. Enter a template name. Choose Windows as the target platform and select the correct authentication template. Enter the path to the network share containing the Java 8 installation batch file. Click the Find Files button and choose the JRE installation batch file from the drop down menu.



Create a separate template for each of the 32-bit and 64-bit batch files.