Deploying Java 8 Runtime on UAC Targets Using the MSI

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 - When using the template to deploy to UAC enabled target systems the same template will install on non UAC enabled target 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.

To get the MSI run Java installer, but press cancel when the installer screen comes up.


Now open up file explorer to the path where the MSI was created by the Java installer - there will be a folder created based on the Java installer being i586 or x64

c:\users\syam\AppData\locallow\oracle\java

Example below shows the user SyAM running the installer


As both msi files have the same name we recommend renaming them with -i586 and -x64 within the file name so you know which MSI  is 32bit and which one is 64bit 

Place the msi file(s) in the default application directory defined on the Administration Settings page of Management Utility.

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 


Batch File for 32bit

@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\jre1.8.0_141-i586.msi c:\tmps

msiexec /i c:\tmps\jre1.8.0_141-i586.msi /qn

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) (UAC Targets)

Batch File for 64bit

@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-upd131

@ECHO OFF

mkdir c:\tmps

xcopy /Y \\192.168.200.46\apps\java\jre1.8.0_131-x64.msi c:\tmps

msiexec /i c:\tmps\jre1.8.0_131-x64.msi /qn

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


Now create the Third Party template in Management Utilities that will install Java.

Remember to check off the option "Copy these files..."




When running the Third Party Deployment Task you must use the UAC Authentication Template