/build/static/layout/Breadcrumb_cap_w.png

Deploying Java 7 Through GPO

File downloads at the bottom

 

First off we need to download the latest .exe for Java. I tend to get it through Oracle's site as you get a better listing and can obtain earlier versions/the JDK (Java Development Kit) if you want it as well. Any who, Java comes in 3 flavours:

 

1. JDK - Java Development Kit
2. Server JRE - "Server Java Runtime Environment" Doesn't include the web plugins but allows you to run RIA's (Rich Internet Applications)
3. JRE - Java Runtime Environment (The stock standard app you'll pick up to distribute on your network)

 

Obtain the version you require from here: http://bit.ly/jdkjre

Once you’ve chosen your flavour, accepted the license agreement and downloaded the Windows x86 Offline version “jre-7uXX-windows-i586.exe” where XX is whatever update they are up to. (~30MB) you can open the .exe with admin rights.

Once it pops up with the java installer window you will find hidden under “%userprofile%\appdata\locallow\Sun\Java” the Java .msi. You can get there by copying and pasting that into a run prompt. Copy the latest Java folder to your server share (mine was jre1.7.0_45) and don’t worry about the Deployment folder. Within this java folder is an .MSI and .cab. We now need to make a transform so the Java Update utility doesn’t annoy users.

Using either Orca or instEd to create an .MSI transform, under the property table set: 

  • AUTOUPDATECHECK      0 (turns off looking for updates)
  • ENDDIALOG       0 (Turns off install finished notice)
  • IEXPLORER          1 (Installs to IE)
  • JAVAUPDATE     0 (Turns off updating)
  • JU           0 (Turns off updating)
  • MOZILLA              1 (Install to firefox)
  • RebootYesNo    0 (Stops auto restart after install)

 

Once that’s all done and you’ve generated/saved your Transform to the network shared Java folder, load up Microsoft’s Group Policy Management console and right click on the Organisational Unit (OU)  that you’ve added your network computers to and select “Create a GPO…”

Name the policy “Java 7uXX” or whatever you would like it to be named, then under:

“Computer Configuration – Policies – Software Settings – Software Installation”

right click in the right hand window, or on the software installation icon and choose “New… - Package”. Find the Java folder you put on your server and select the .MSI and choose “Advanced” as the deployment method.

Once the panel opens up, go to the Modifications tab and select Add. Locate your Transform and click Ok. The package will now be loaded into MS GPO and you can exit out of the window as it is already saved.

 

To delete the Start Menu icons run this script at shutdown (or startup) (.bat)

@echo off

if exist "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Java" (
    rmdir "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Java" /s /q

In terms of uninstallation download the JavaUninstall.bat file. This will uninstall Java up to version:

  • 8.0
  • 7u51
  • 6u71
  • 5u23
  • 1.4.2_19
  • 1.3.1_25

 

Uninstall Script + SuperJRE Download:

JavaUninstall.bat:  http://bit.ly/jreUninstall
SuperJRE (All Java 7 updates with Transform - 439.04MB): http://www.mediafire.com/download/crlxvyq7vdceas0/SuperJRE.zip


JRE Installations per version (~30MB):

JRE 7u51.zip (MSI+CAB+Transform) : http://bit.ly/jre170_51
JRE 7u45.zip (MSI+CAB+Transform) : http://bit.ly/jre170_45
JRE 7u40.zip (MSI+CAB+Transform) : http://bit.ly/jre170_40_1
JRE 7u25.zip (MSI+CAB+Transform) : http://bit.ly/jre170_25
JRE 7u21.zip (MSI+CAB+Transform) : http://bit.ly/jre170_21
JRE 7u17.zip (MSI+CAB+Transform) : http://bit.ly/jre170_17
JRE 7u15.zip (MSI+CAB+Transform) : http://bit.ly/jre170_15
JRE 7u13.zip (MSI+CAB+Transform) : http://bit.ly/jre170_13
JRE 7u11.zip (MSI+CAB+Transform) : http://bit.ly/jre170_11
JRE 7u10.zip (MSI+CAB+Transform) : http://bit.ly/jre170_10
JRE 7u09.zip (MSI+CAB+Transform) : http://bit.ly/jre170_09
JRE 7u07.zip (MSI+CAB+Transform) : http://bit.ly/jre170_07
JRE 7u06.zip (MSI+CAB+Transform) : http://bit.ly/jre170_06
JRE 7u05.zip (MSI+CAB+Transform) : http://bit.ly/jre170_05
JRE 7u04.zip (MSI+CAB+Transform) : http://bit.ly/jre170_04
JRE 7u03.zip (MSI+CAB+Transform) : http://bit.ly/jre170_03
JRE 7u02.zip (MSI+CAB+Transform) : http://bit.ly/jre170_02
JRE 7u01.zip (MSI+CAB+Transform) : http://bit.ly/jre170_01
JRE 7u00.zip (MSI+CAB+Transform) : http://bit.ly/jre170_00

 


Comments

  • Very impressive work. Thanks for sharing. - rockhead44 10 years ago
  • Has been updated to include Java 7u51, 6u71, 6u65. The uninstall .bat script has also been updated to reflect the new versions!
    Trancendence. - trancendence 10 years ago
  • Thanx for sharing! - Emiel1975 10 years ago
  • Hi,
    Thanks for sharing!
    I'm using your Java7u51 msi+transform with WsusPackagePublisher.
    I wrote this small powershell script that WSUSPackagePublisher can make Windows Update execute before it installs Java - it kills some processes, cleans up Java AppData folder, cleans up Java stuff in all the users Registry and copy's current folders deployment.config and deployment.properties.

    It makes me able to update Java without rebooting.


    ## Date to logfile ##
    mkdir C:\temp -ErrorAction SilentlyContinue
    Write-Output (Get-date) | Out-File C:\temp\Java-CleanUp.log -Append -Force

    ## Kill Processes ##
    $procs = @( "*javaw*","*javaws*","*firefox*","*iexplore*","*iexplorer*","*chrome*","*jaucheck*","*jaureg*","*jucheck*","*jusched*","*SpcUiClient*","*jqs*","*java*")
    foreach ($proc in $procs) {
    Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue
    Write-Output "Killing process: $proc" | Out-File C:\temp\Java-CleanUp.log -Append -Force
    }

    Stop-Service -Name "JavaQuickStarter" -ErrorAction SilentlyContinue

    ## Del folders ##
    Remove-Item -Path C:\Windows\Sun -Recurse -Force -ErrorAction SilentlyContinue

    ## Clean AppData ##
    $usersPath = Get-ChildItem -Path "C:\Users"
    ForEach ($userPath in $usersPath)
    {
    if (Test-Path -Path "C:\Users\$userPath\AppData\LocalLow\Sun")
    {
    Remove-Item -Path "C:\Users\$userPath\AppData\LocalLow\Sun" -Force -Recurse
    Write-Output "C:\Users\$userPath\AppData\LocalLow\Sun has been removed." | Out-File C:\temp\Java-CleanUp.log -Append -Force
    }
    }

    ## Clean Registry ##
    $regUsers = Get-ChildItem -Path "registry::HKey_Users"
    $regUsers | Where-Object {$_.Name -like "*21*" -and $_.Name -notlike "*Classes"} | ForEach-Object {if(test-path -Path "Registry::$_\Software\AppDataLow\Software\Javasoft"){remove-item -Path "Registry::$_\Software\AppDataLow\Software\Javasoft" -Force -Recurse}}

    ## Make folders ##
    mkdir C:\Windows\Sun -ErrorAction SilentlyContinue
    mkdir C:\Windows\Sun\Java -ErrorAction SilentlyContinue
    mkdir C:\Windows\Sun\Java\Deployment -ErrorAction SilentlyContinue

    ## Copy files ##
    Write-Output (Get-Location) | Out-file C:\temp\Java-CleanUp.log -Append -Force

    Copy-Item -Path .\deployment.config -Destination C:\Windows\Sun\Java\Deployment\deployment.config -Force
    Copy-Item -Path .\deployment.properties -Destination C:\Windows\Sun\Java\Deployment\deployment.properties -Force - Nikolaj 10 years ago
  • Running the install twice seems to ruin Java. In stead of just reinstalling/repairing Java it deletes a lot of ressources. Afterwards, if I press Java (32 bit) in the controlpanel I get the error: "Explorer.exe Program not found" - RoejbaekDK 10 years ago
    • Do you uninstall it or redeploy it using GPO? you can explicitly tell it through Group Policy Management Console to redeploy the application. - trancendence 10 years ago
      • Hey Trancendence
        It is a general problem from where I stand. It happens if I do it manually or through any distribution system.
        In my opinion the MSI is bugged.
        If you open the MSI using orca or installshield you'll see that the MSI contains very few ressources like a zip-file (the CAB contains a ZIP-file :)) and the actual install is done by another custom action Doesn't really feel like Windows Installer best practice.
        Mind I do not get the same errors using the EXE. Only when extracting the MSI - RoejbaekDK 10 years ago
      • Thats cool, but this is the way that Oracle have said to install Java for years, so best talk to them.. :/ - trancendence 10 years ago
  • Does the above download (JRE 7u51.zip (MSI+CAB+Transform) already contain the ORCA edits to the MSI to prevent the updates? So a download of that allows one to skip past all those steps and just go to the GPO deployment. - anonymous_94669 10 years ago
    • Yes! all the transforms have already been done for you for ease of use and deployment :) - trancendence 10 years ago
  • In case anyone is dealing with users installing Java 8 early, here are the uninstall commands for it!

    MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218000FF} /passive /norestart
    MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418000FF} /passive /norestart - mzocher 10 years ago
    • Java 8 Already... That was quick!! Thanks! Will add it in the near future :) - trancendence 10 years ago
    • Uuuuupppdated! :D Thanks! - trancendence 10 years ago
    • Does anyone have the uninstall commands for 6u65? - TechAFG 10 years ago
      • It's in the mega uninstaller..
        REM JRE Runtime Environment 6.0 Update 65 (x64)
        MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416065FF} /passive /norestart
        REM JRE Runtime Environment 6.0 Update 65 (x86)
        MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216065FF} /passive /norestart - trancendence 10 years ago
  • do you have uninstall commands for 7u55? - eddiehead 10 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ