** Since creating this article when java 7u45 came out, I've updated my process a bit, and created an updated article - if you're looking for info on updating Java you might get better info at this link **
This is a walk through of how we plan to deploy the latest version of Java. We use a managed software delivery policy instead of patch management so we can customize the installer to (hopefully) not prompt user for updates. Hope it helps someone.
1) Download the latest offline installer from http://www.java.com/en/download/manual.jsp
2) Extract the MSI using these directions http://www.java.com/en/download/help/msi_install.xml
3) Copy .cab and .msi to folder on desktop
4) Open InstEd and do file Open and select copied .msi
5) Select Transform, new transform
6) In same folder where .cab and .msi file are, create transform named like jre1.7.0_45.mst
7) Under the "Property table" add following PROPERTIES:
a. AUTOUPDATECHECK=0
b. IEEXPLORER=1
c. JAVAUPDATE=0
d. JU=0
e. MOZILLA=1
f. RebootYesNo=No
When you reopen InstEd it shows you values you changed on top, like below for easy double checking
8) Go to Registry Table and right click in window and select add row, registry: String and enter Key
a. Registry = NotifyDownload
b. Root = 2
c. Key = Software\JavaSoft\Java Update\Policy
d. Name = NotifyDownload
e. Value = 0
f. Component_ = jz
9) Create (or copy existing) deployment.config and deployment.properties file to same folder where .cab, .mst, and .mst files are. These are plain text files.
a. Our deployment.config file following 2 lines
deployment.system.config.mandatory=true
deployment.system.config=file:\\C\:\\Windows\\Sun\\Java\\Deployment\\deployment.properties
b. Our deployment.properties file is following 2 lines
deployment.javaws.autodownload=NEVER
deployment.javaws.autodownload.locked
You can add more options to properties file based on what’s available in current release. See http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/properties.html
The folder on the desktop should now have 5 files, data1.cab, deployment.config, deployment.properties, .msi file and .mst file.
10) Open CMS and navigate to Manage – Software Catalog - Import
11) Click plus button and navigate to folder where all 5 java related files exist, select all files and then select open
12) Make sure .msi file is bolded, if not highlight it and select “Set Installation File”
13) Select Next, files upload to CMS. Edit name, etc as desired. Leave checkbox checked for edit software resource… Select OK.
14) On package tab, delete Install, install no IU and install for all users leaving just Install for all users with no UI/Repair/Uninstall options (not necessary). For the “Install for all users with no UI” command line, edit it so it uses the MST file you created
a. Ex msiexec.exe /i "jre1.7.0_45.msi" TRANSFORMS="jre1.7.0_45.mst" /qn ALLUSERS=2
15) Detection rule is auto created. For Applicability, enter as needed (I leave both at default). Click OK to save.
16) Navigate to your CMS sharepoint \\cms\SoftwareLibrary and find the UUID of the folder uploaded (latest time /date stamp). This is the same UUID folder name that gets copied locally to workstation when rolling out.
17) Create command script task to copy deployment files to right location. My script also includes lines to delete javaUpdate registry file if it exists because some people had this from previous versions and the Java 7 45 installer wasn’t clearing it and leaving the update tab in the control panel app. Here’s example script – replace 9f283b6e-34b5-4e23-a171-82d3axxxxxxx with the UUID from step 16.
xcopy "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{9f283b6e-34b5-4e23-a171-82d3axxxxxxx}\cache\deployment.config" C:\Windows\sun\java\deployment\ /y
xcopy "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{9f283b6e-34b5-4e23-a171-82d3axxxxxxx }\cache\deployment.properties" C:\Windows\sun\java\deployment\ /y
reg add "HKLM\Software\JavaSoft\Java Update\Test"
reg delete "HKLM\Software\JavaSoft\Java Update" /f
11) If needed, create vbscript to remove all previous versions of Java if needed. I got my script from “serverkudsk” comment in this thread . I changed the line strCurrentVersion to be Java(TM) Update 45, this script removes all versions of java on machine below 1.7.45.
http://www.itninja.com/question/silent-uninstall-java-all-versions
12) Create Managed software delivery Policy with 2 scripts and add software task. I also add a task to delete software cache (this regenerates the software listed in inventory, there was a bug in 7.1 where old software doesn’t get removed unless you clear cache), and then run a software inventory scan. Set applied to and schedule as necessary for your org.
This is what my policy looks like
Note: To create a filter to see who has your app installed, go to Software in CMS, software releases, find the package you created and right click and select actions, create installed software filter.
Reference:
Packaging Java (ITNinja) http://www.itninja.com/blog/view/java-7-update-25-best-way-to-deploy-with-customized-settings
http://www.itninja.com/software/oracle/java-2/7-552
Deployment Configuration File and Properties (Oracle) http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment-guide/properties.html