Loading

Follow Us

Follow us on Spiceworks

Subscribe by Email

Your email:

Browse by Tag

Current Articles | RSS Feed RSS Feed

Install Java Silently

  
  
  
  

UPDATE Jan 2013: This post is specific to Java 6. For Java 7 update info we have an updated blog post here.


Oracle has released Java 6 Update 25. To silently install to all your computers you'll need to do some extra steps:

  1. Download the "offline" version from the Java website
  2. Manually "start" the installation
  3. Extract the .MSI and necessary data files from the downloaded EXE
  4. Copy the extracted files from %LOCALAPPDATA%
  5. Cancel the manual installation
  6. Deploy Java to all your company computers

First things first, download the off-line version of Java. Be certain to download the offline version (see image below).

Download the offline Java installer for silent installations

 

The next step is to "extract" the MSI and data files, which allows you to deploy silently vs. using the manual GUI installation. You extract the files by starting a manual installation.

Double click the EXE that you downloaded and the Java installation GUI appears. You will NOT progress past this opening screen, but for now KEEP this window open. The extraction has taken place and we need to grab the files.

PDQ12 Java 25 05

In Windows navigate to the following path.

%LOCALAPPDATA%

Java extracts to %LOCALAPPDATA%

This should open a window in the AppData Local directory. Now go up a level to AppData and navigate into the LocalLow sub-directory. You should see a "Sun" directory. Copy that to another location (network share, server, etc.). Inside of this directory are the data files that you will need.

After you have copied the files to another source you can cancel the manual installation.

NOTE: The 32-bit version of Java 1.6 update 25 doesn't delete the Data1.cab file when you cancel the manual installation, but IT DOES delete the Data1.cab file when you run this step on the 64-bit version of the Java update. That's why we suggest you copy the files to another location before canceling the manual installation. 

Now it's time to deploy Java 1.6 update 25 to your computers. I'm using our free software deployment tool PDQ Deploy. Navigate to the MSI that you extracted and right-click on it.

Select "Deploy with PDQ".

PDQ Deploy opens up a New Installer window. Give it a title and be certain to select the "Include Entire Directory" checkbox.

Silently Install Java 6

PDQ Deploy automatically populates everything else for you. You can now click OK and the Java installer will be created.

With your installer created you can now deploy to your computers. From PDQ Deploy, select your new Java 1.6 installer and click the Deploy Now button.

A window appears for you to enter which target computers will receive the installation. You have a multiple methods to enter targets:

  1. Manual entry (typing the computer name)
  2. Importing a text file
  3. Active Directory
  4. PDQ Inventory (if installed)
  5. AA Console (if installed)

Install Java using a free installation tool

    Enter your target systems and click "Deploy Now" and your installation will begin. Once you've started it you can double click on the deployment to get a detailed view of the installation.

    PDQ Deploy silently installs Java 6

    That's it. Let your installation complete and you'll be in business.

    Here are a couple of additional items that may be of use to you. I'll blog about these in the coming days.

    With PDQ Inventory (recently released to beta) you can determine which computers do not already have Java 1.6 update 25 installed. This is a fast way to deploy the update to only those systems that need it.

    With PDQ Deploy Pro you can run multiple actions or commands in one installer. This is helpful for Java because you should install both the 32-bit and 64-bit versions on your 64-bit Vista and Windows 7 systems that have IE 8. With PDQ Deploy Pro you can do this in one installer.

    Please let us know if you have any questions about installing Java or any other application using PDQ Deploy.

    Comments

    I am using a batch file for years now. 
     
    ----------------------- 
     
    @echo off 
     
    echo Removing previous JRE versions 
     
     
     
    for /f %%a in (jre-uninstall-list.txt) do MsiExec.exe /uninstall %%a /passive /quiet 
     
     
     
    echo Installing current JRE version 
     
    jre-6u25-windows-i586.exe /qn /s AgreeToLicense=YES IEXPLORER=1 MOZILLA=0 REBOOT=ReallySupress JAVAUPDATE=0 ADDLOCAL=ALL AUTOUPDATECHECK=0 JU=0 
     
     
     
    echo Removing Java update sheduler 
     
    reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SunJavaUpdateSched /f 
     
     
     
    echo Stopping Java QuickStarter Service 
     
    net stop JavaQuickStarterService 
     
    @ping localhost -n 5 >nul 
     
     
     
    echo Removing Java QuickStarter Service 
     
    sc delete JavaQuickStarterService 
     
     
     
    echo Done... 
     
    ----------------------- 
     
     
     
    the jre-uninstall-list.txt sontains GUIs of previous versions. 
     
     
     
    {3248F0A8-6813-11D6-A77B-00B0D0150000} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0150030} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0150060} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0150090} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0150100} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0150110} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0160010} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0160020} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0160030} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0160040} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0160050} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0160060} 
     
    {3248F0A8-6813-11D6-A77B-00B0D0160070} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216010FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216011FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216013FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216014FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216015FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216016FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216017FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216018FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216019FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216020FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216021FF} 
     
    {26A24AE4-039D-4CA4-87B4-2F83216022FF} 
     
     
     
    I usually pack the whole to a single self extreacting archive using WinRAR. The batch is executed automatically after extraction. 
     
     
     
    When updating i only need to change the jre installer file name, add a GUID to the list and pack to the single exe. 
     
     
     
    Of course it is possible to modify the batch so that it finds the installer automatically. But... it owrks... :-D
    Posted @ Wednesday, May 25, 2011 6:46 PM by SelfMan
    Thanks for your comments and for sharing your batch file. We'll be sure to keep the comment here for future users. Uninstalling previous Java versions is always recommended. Thanks again.
    Posted @ Wednesday, May 25, 2011 11:40 PM by Shawn Anderson
    That's a long batch file! Also there are two commands, iexplore=1 & mozilla=1, plus a second one that I can't recall that are deprecated.  
     
     
     
    Shawn thanks for the update but it didn't really address the question I was referring to. If you look at the screenshot of the extracted files from the offline installer, you'll see a file named sp1033.MST. It is a transform file for Java's MSI file.  
     
     
     
    I've done just a regular msi install & msi with that transform file. The only difference I noticed was that the transform took 5 extra minutes to completely install. I'm not sure what it's modifying.  
     
     
     
    Posted @ Thursday, May 26, 2011 7:48 AM by Jonathan Plaza
    Jonathan, excellent point. Thanks for reminding me of your original forum question on MST for Java. I'll put this on my list to delve into. In the meantime will you please send your MST to support@adminarsenal.com and I'll run it in our lab to see if I can discover bottlenecks.  
     
    Shawn
    Posted @ Thursday, May 26, 2011 10:48 AM by Shawn Anderson
    @ SelfMan 
     
     
     
    ADDLOCAL was the other part of the command that is no longer used now that I got to see the docs.  
     
     
     
    Looks like java doesn't reference its own mst file, so I guess it's not important if we don't apply their mst file with the msi.  
     
     
     
    Wished they actually showed what options could be modified for an mst. I've modified it a long time ago (update 15) with orca but I really prefer to see the docs from official source.  
     
     
     
    Thanks.
    Posted @ Thursday, May 26, 2011 11:46 AM by Jonathan Plaza
    As you can see even these doc pages are very spartan. 
     
    What bothers me most is the crap JRE leaves on different places of the system. i.e. C:\Users\<profile>\AppData\LocalLow\Sun\Java and not only for the current user. While some stuf hangs within C:\Windows\Installer folder.
    Posted @ Thursday, May 26, 2011 12:06 PM by SelfMan
    Jonathan, just posted a new blog about this very topic (TRANSFORMS). 
     
    http://www.adminarsenal.com/admin-arsenal-blog/bid/58765/Installing-Java-using-Transforms-To-MST-or-Not-to-MST 
     
    I agree that there is no value in calling the MST. I jumped inside and didn't see anything that I would change that couldn't be changed during installation as an MSI parameter. Also, as you mentioned, there is a lack of official documentation from Oracle. That's why I glean so much from other admins on the Java forums, but in this case, the forums are oddly silent.
    Posted @ Friday, May 27, 2011 6:20 PM by Shawn Anderson
    You know you are getting up there on the radar when your blog is spammed.
    Posted @ Wednesday, July 13, 2011 8:11 AM by Jonathan Plaza
    Hi Jonathan, you gotta love the spam comments. Lately it's been legitimate businesses who have likely hired some shady SEO folks who will end up doing more harm than good. We usually catch the spam quickly. The best thing a blog can do is to turn off comments after 60 days (which we do). If it continues to increase we'll put a delay in to catch them before they post. 
     
     
     
    Thanks again. 
     
     
     
    Shawn "You can buy brand new shoes here!" Anderson
    Posted @ Wednesday, July 13, 2011 10:49 AM by Shawn Anderson
    Hey Jonathan, we've turned on verification again. Now we'll need to clear every comment. Hopefully that will clean things up a bit.
    Posted @ Tuesday, July 19, 2011 9:07 AM by Shawn Anderson
    Comments have been closed for this article.