I have been experiencing a lot of inconsistencies deploying Java updates to our users.

1) The first problem is that using the same command line, I can get the 64-bit version of 7u5 to install but not the 32-bit version:

"jre-7u5-windows-i586.exe" /s /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 REBOOT=suppress

"jre-7u5-windows-x64.exe" /s /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 REBOOT=suppress

2) My second question is what is the best way to deploy Java and uninstall previous versions? I'd like to keep the list of installed programs tidied up, but also...

3) I ask this because even after the succesful deployment of the 64-bit version I can't get browsers to recognize the new version. It will, however, recognize previous versions. I've seen this affect users who show the latest version installed and yet none of their applications that require Java function properly.

I use the executable instead of the .msi because we use Dell's KACE system for deployments. If I can push the executable, it'll save me time for other things.

With that being said, I am curious if any of you have had the same experiences and have recommendations as to what I could change to improve reliability of my Java deployments.

Thanks!

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

I'm really not sure about your first problem, but I know a little about the second. I have the same problem with Java 7 not uninstalling Java 6 versions. These commands seemed to work during the initial testing phase.

MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216032FF} /QN
MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416032FF} /QN
MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216031FF} /QN
MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416031FF} /QN

These command should uninstall the Java6 Update 31-32 32/64 bit versions. No garuantees, but they might be helpful. If you need to uninstall older versions there are scripts that can be found by googling. 

Answered 06/25/2012 by: Ben M
Ninth Degree Black Belt

Please log in to comment
1

Your first problem is clear. The ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 REBOOT=suppress are actually parameters you need to pass to the msi instide the exe. Please change your command line to this

jdk-7u5-windows-i586.EXE /s /v"ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 REBOOT=suppress" /qn

notice the /v"*". That passes those paramas to the embedded msi. /qn actaully is passed to the msi too. /s unpackages the msi from the exe silently.

Answered 06/26/2012 by: Tentacle Master
Fourth Degree Black Belt

  • Oh and I tested it too. Since I'm half way done I'll go ahead and make my K1000 package now.
Please log in to comment
1

I tried to install the full copy of the 32 bit version of Java 7 update 6 using system credentials (See  PSEXEC, http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx) and received the following error:

Error opening file
C:\Windows\system32\config\systemprofile\AppData\LocalLow\Sun\Java\jre1.6.0_29\Java3BillDevices.jpg

Error: 2

When I later created a scripted install for the 32 bit Java I was able to install the software without issue using full Administrator credentials. The issue seem to only effected the Full version of Java 7.  

Answered 09/05/2012 by: stevech
Purple Belt

  • Just FYI, I ran into huge headaches with Java too!
    Java 6 32bit and 64bit EXE formats work fine.
    Java 7 64bit EXE works fine.
    Java 7 32bit EXE will not work due to the system account references a different registry setting than the logged on user and it fails. This is why you test your script locally and it works perfect, but then you load it up in Kace and it will not install

    If you want to uninstall all the old Java and install the latest latest Java 32bit and 64bit:
    1. Download latest Java 32bit and 64bit
    2. Launch Java 32bit, but do not install. Leave window open.
    3. Create a folder on desktop called Java
    4. Go to C:\Users\user\AppData\LocalLow\Sun\Java\jre1.7.0_15
    5. Copy Data1.cab and jre1.7.0_15.msi to the Java folder on your desktop.
    6. Rename msi to Java32bit.msi
    7. Copy Java 64bit into Java folder and rename to Java64bit.exe
    8. Create a Batch File in the Java folder: Let's name it JavaUpdate.bat
    9. Paste the following in the batch:
    @ECHO OFF
    taskkill /F /IM iexplorer.exe
    taskkill /F /IM iexplore.exe
    taskkill /F /IM chrome.exe
    taskkill /F /IM firefox.exe
    taskkill /F /IM javaw.exe
    taskkill /F /IM jqs.exe
    taskkill /F /IM jusched.exe
    REM START /WAIT /MIN WMIC product where "Name LIKE '%%Java Runtime%%'" call uninstall /nointeractive
    REM START /WAIT /MIN WMIC product where "Name LIKE '%%Java 2 Runtime%%'" call uninstall /nointeractive
    REM START /WAIT /MIN WMIC product where "Name LIKE '%%J2SE Runtime%%'" call uninstall /nointeractive
    REM START /WAIT /MIN WMIC product where "Name LIKE '%%Java(TM) 6 Update%%'" call uninstall /nointeractive
    START /WAIT /MIN WMIC product where "Name LIKE '%%Java 7 Update%%'" call uninstall /nointeractive
    Java32bit.msi /qn /norestart
    Java64bit.exe /s WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H
    EXIT
    10. Download BAT to EXE Converter: http://www.f2ko.de/programs.php?lang=en&pid=b2e (This is an awesome utility that allows you to convert bat to exe and completely hide it.
    11. Browse to Your JavaUpdate.bat. Change the option to Invisible application and Add Administrator manifest.
    12. Now zip the contents of your java folder.
    13. Now on the K1000 go to inventory / software and create a new software package called Update Java.
    14. Make sure the right OS are selected, browse to java file and upload the zip. Save
    15. Go to Software Distribution create new, click the drop down box to browse for the software package you just made.
    16. As stated above, check Don't Prepend msiexec.exe.
    17. Type the name of your exe file in the box: JavaUpdate.exe
    18. Save and Deploy*

    *Please note that Java is a pain so there are some enterprise politics you must consider. If a browser is open when you do the upgrade, the computer will automatically restart. So you must check to kill the browser first. So you need to consider using the Kace message box feature. For our company, deploying at night was the best for the majority of the systems.
Please log in to comment
1

You CAN actually use the MSI through Kbox.  You can either set it up as a Managed Install, or Script.  I have found that by deploying an extracted version of Java, the install SKIPS the Java Auto Update application (which can't be seen in Programs and Features on Windows, but can be seen in Kbox application inventories).  Without it, I am fairly confident that auto updating can't run regardless of what the Java control panel says.  I have tested this with Java 7 update 6 and so far have not received any update prompts.  As of Java 7 update 9, a full 64-bit executable install does not include the Java Auto Updater, so I assume Oracle hasn't gotten auto updates to work on 64-bit yet, so no need to worry there.

You can deploy 32-bit Java 7, to 32- and 64-bit Windows, suppressing auto updates, through Kbox, as follows (I have tested this with Java 7 update 9):

1.  Extract the .msi and Data1.cab files from the executable.  You can do this by beginning to run the install, then going to your user account's AppData/LocalLow/Sun/Java directory to find the extracted files.

2.  For a Managed Install:
- Zip up the two extracted files. In a new Managed Install for Java version whatever, upload the zip file to associate it with the software title.
- Install Command: Select Configure Manually, then type msiexec /i "jre1.7.0_09.msi" /qn AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1
(Note: After the /i, type the name of the MSI you extracted - I'm just using the latest Java version at this time)
- Select Don't prepend msiexec.exe
- I believe all other settings are default or your preference.

For a Kbox Script:
- Run as Local System
- Upload the following as Dependencies:
     - Data1.cab
     - your .msi file
     - a batch file with the following command in it: msiexec /i "jre1.7.0_09.msi" /qn AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1
- For Task 1, under On Success:
     - Directory:  $(KACE_DEPENDENCY_DIR)
     - File:  nameofbatchfile.bat
     - The rest of the settings are default or your preference.

Answered 11/09/2012 by: RunInCircles
White Belt

Please log in to comment
This content is currently hidden from public view.
Reason: Removed by user request
For more information, visit our FAQ's.

0

The above command in a K1000 distribution will work for the 32 bit version on Java 7 update 5 but you need to make sure you click the box for " Don't Prepend msiexec.exe"

Answered 08/20/2012 by: stevech
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity