If you feel this tip has saved you time or effort, please consider buying us a cuppa coffee to keep things going!
Prepare Java 6 Files
Download jre-6u29-windows-i586-s.exe from http://www.java.com/en/download/manual.jsp (choose the offline installer - the 6u29 version is about 16.5 MB)
Run jre-6u29-windows-i586-s.exe. When the installer stops at the first prompt, open the folder C:\Documents and Settings\<username>\Application Data\Sun\Java\jre1.6.0_29
Note: If you are working on a Windows Vista or Windows 7 machine, the path will be a bit different: C:\Users\<username>\AppData\LocalLow\Sun\Java\jre1.6.0_29
Copy the files in this folder to a new folder.
Customise Java 6 installation
Open the msi copied in the step above with Orca:
Create a new transform and make the following changes to the property table:
Change IEXPLORER to 1 - enables the java plugin for Internet Explorer
Change MOZILLA to 1 - enables the java plugin for Firefox
Change SYSTRAY to 0 - remove coffee cup icon in Systray when java applets run
Change JAVAUPDATE to 0 - stops users being prompted to update Java
Save the transform in the folder with the MSI and CAB files, and close Orca.
Deploy Java 6
Copy the .msi, .cab and .mst to your remote install share
Deploy via Group policies as normal.
Note: You can test deployment of Java by opening your browser and going to http://www.java.com/en/download/installed.jsp?detect=jre&try=1
Troubleshooting
Cannot uninstall 6 update 10
If you have previously deployed java 6 update 10 via group policies, you will find that the computer gets stuck trying to remove during the usually "Uninstalling managed software" part of the deployment.
There is an issue with update 10 where the Java Quick Start service does not get shutdown properly. To fix this:
-
Open your software deployment group policy
-
Go to Computer Configuration -> Policies -> Windows Settings -> Security Settings -> System Services
-
Set the "JavaQuickStarterService" service to disabled.
Note: You need to have the Java update 10 installed on the machine you do this on otherwise the service will not appear in the services list
Unzipping Core Files Failed
If you get this message while trying to install a newer java version, or you find that your managed software deployment of java does not install properly, you may find that parts of a previous java install have not been removed properly.
Manual workaround:
Log into the machine and delete the C:\Program Files\Java folder
Restart the machine and try the deployment again
Automatic workaround:
In my case I found that the java uninstaller would leave parts of the installation behind, but would remove the lib folder. I wrote a simple startup script to check for the folder; if the folder is missing, it deletes all the java files.
setlocal
set path1="C:\Program Files\Java\jre6\lib"
set path2="C:\Program Files\Java"
IF NOT EXIST %path1% rmdir /q /s %path2%
Internal Error 2753. regutils.dll
If you get this error when trying to deploy a new version of Java, it may be because the old version is still listed in the add/remove programs list. I found the easiest way to remove this entry is by using the Windows Installer Cleanup Utility - which can be found here: http://support.microsoft.com/kb/290301
Install the utility, run it and choose the offending Java install from the list. Reboot the computer once the cleanup is complete, and the deployed version should install without error.
If I need to do this en-mass, I scripted the removal using a .reg file - In the startup script for the machines put an entry like this:
regedit /s \\server\netlogon\DeleteJava1.6_10.reg
Have a look in the HKR\Installer\Products\ key or sometimes the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for the key that has the program you are trying to remove.
After looking in the HKR\Installers keys, I created a "DeleteJava1.6_10.reg" file looks like this:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Installer\Products\4EA42A62D9304AC4784BF238120601FF]
"ProductName"="Java(TM) 6 Update 10"
"PackageCode"="2F7E2D79437BFE04AA3B4AFE07491B78"
"Language"=dword:00000000
"Version"=dword:06000064
"Transforms"=hex(2):40,00,6a,00,72,00,65,00,31,00,2e,00,36,00,2e,00,30,00,5f,\
00,31,00,30,00,2e,00,6d,00,73,00,74,00,00,00
"Assignment"=dword:00000001
"AdvertiseFlags"=dword:00000104
"InstanceType"=dword:00000000
"AuthorizedLUAApp"=dword:00000000
"Clients"=hex(7):3a,00,00,00,00,00
[-HKEY_CLASSES_ROOT\Installer\Products\4EA42A62D9304AC4784BF238120601FF\SourceList]
"PackageName"="jre1.6.0_10.msi"
"LastUsedSource"="n;1;\\\\server\\RemoteInstall\\Java 1.6.10\\"
[-HKEY_CLASSES_ROOT\Installer\Products\4EA42A62D9304AC4784BF238120601FF\SourceList\Media]
"DiskPrompt"="[1]"
"1"="DISK1;1"
[-HKEY_CLASSES_ROOT\Installer\Products\4EA42A62D9304AC4784BF238120601FF\SourceList\Net]
"1"=hex(2):5c,00,5c,00,74,00,69,00,74,00,61,00,6e,00,5c,00,52,00,65,00,6d,00,\
6f,00,74,00,65,00,49,00,6e,00,73,00,74,00,61,00,6c,00,6c,00,5c,00,4a,00,61,\
00,76,00,61,00,20,00,31,00,2e,00,36,00,2e,00,31,00,30,00,5c,00,00,00
|