This works as of Java 7 update 21. I've been using this method since early versions of Java 7. 

--Edit-- I found that a small percentage of users were having issues with Java appearing to  be missing in Firefox and Chrome. I have found the culprit to be Java FX 2.1.1. It is necessary to remove Java FX 2.1.1 to get Firefox and Chrome to work for these users, but it can be done before or even after Java 7 update 11 is installed. Using the Un-Install Wizard under Scripting > Configuration Policy and keeping everything on default worked flawlessly for me. ----

When I first started playing around with Java deployments using managed installations, I came across the issue of getting 32-bit Java deployed to 64-bit machines. I found a few workarounds, but they required scripts or too much manual work. I wanted the convenience of a managed install. This is what works for me. 

  • Download the Java x86 offline install.
  • Start the installation.
  • Browse to folder: C:\Users\currentuser\AppData\LocalLow\Sun\Java\jre1.x.0.xx
  • Zip together the following files: jre1.x.0_xx.msi and Data1.cab
  • Create a new managed installation. 
  • Upload the zipped file.
  • Set the installation command to configure manually and use this string: msiexec /i "jre1.7.0_21.msi" /qn AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1

Note: The string above installs silently, turns off auto update and update notifications, and registers java with all browsers.Also, since new versions of Java come out more frequently than I update this post, make sure the installation command matches the version of Java you are using.

  • Check the box for "Don't Prepend msiexec.exe".

That's it! Happy deploying!

Pro tip: We use the "Execute after logon (before desktop loads)" managed action to prevent the install from corrupting due to Java being in use on the target machine when it is pushed out. If you want to execute immediately, you can zip up a .bat file with the msi and cab files and then replace the installation command with "filename.bat" (still have it set to configure manually). In the .bat file, you should have:

taskkill /f /im java.exe

taskkill /f /im jusched.exe

taskkill /f /im jp2launcher.exe

msiexec /i "jre1.7.0_21.msi" /qn AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1