Deploy Java with GPO

Steps to deploy Java with GPO to client machines automatically

  1. Register a free Oracle account and download Java Runtime 6u27-Windows x86 Offline .

  2. Double click on the downloaded exe file and stop at the screen below

GPO-Java6-01

  1. Copy the MSI & CAB files from %userprofile%\appdata\locallow\Sun\Java and save it in C:\Temp
  2. Download and install Orca MSI Editor to make a Transform file (MST) to disable Java Auto Update

  3. Launch Orca MSI Editor and open the downloaded jre1.6.0_27.msi file. Click on Properties to modify the following values

GPO-Java6-02

Properties Values Remarks
AUTOUPDATECHECK 0 Turn Off Auto Update
ENDDIALOG 0 Turn Off install finished notice
JAVAUPDATE 0 Turn Off Auto Update
JU 0 Turn Off Auto Update
IEXPLORER 1 Install to Internet Explorer (IE)
RebootYesNo 0 Stop Auto Reboot
  1. Click New Transform and Generate Transform to generate the Tranform File (MST). Save the generated .mst file to C:\temp

GPO-Java6-03

  1. Copy the jre1.6.0_27.msi, j6.mst and cab file to Network Share Folder
  2. Create a new GPO for Computer Configuration and right click on Software Installation to create a new Software Installation Package

GPO-Java6-04

  1. Select jre1.6.0_27.msi

GPO-Java6-05

  1. Select Advanced

GPO-Java6-06

  1. Go to Modifications adn add the MST file

GPO-Java6-07

  1. Link the GPO to the OU and the Java6 will be automatically installed to computer (Restart of computer is required for GPO to be applied)

To uninstall existing JAVA 7 or 8 if detected
1. We noticed that any JAVA 7 or 8 installed on existing workstations, the installed JRE6 U27 will not be used when opening the Oracle Application.

  1. Prepare a Computer Startup script to uninstall any JAVA 7 or 8 installed
$Java8 = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like 'Java 8*'}
$Java7 = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like 'Java 7*'}


if ($Java7) {

    $Java7Version = $Java7.IdentifyingNumber
    $Command = "msiexec /x $Java7Version /qn"
    cmd /c $Command 

} 


elseif ($Java8) {

    $Java8Version = $Java8.IdentifyingNumber
    $Command = "msiexec /x $Java8Version /qn"
    cmd /c $Command 

} 

else {

}

Redeploy Software via GPO

GPO will keep track of installed Software Package in the registry. If you uninstall the deployed applications manually, the application will NOT be redeployed again even you reboot your workstations.

You will need to manually delete the key represented the Applications in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\AppMgmt to let the applications redeployed again from GPO

Reference
1. https://www.mysysadmintips.com/windows/active-directory/210-force-applications-to-be-re-installed-by-group-policy

  1. https://www.itninja.com/blog/view/deploying-java-7-through-gpo

Leave a Comment

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

Scroll to Top