Kaseya Community

Java 6 update 15 scripts...

  • Just saw Java 6 update 15 was released that fixed some vulnerabilities.

    I put together scripts to deploy the X64 and X86 releases to the appropriate Windows OS. I tested them on several Workstations and Servers, both 32-bit and 64-bit and didn't have any problems but be sure to test these on your own first, I'm just a one man QA team Wink

    To Import, select either My Scripts or Public Scripts on your scripts tab depending on whether or not you want this shared with other Kaseya administrators on your system. On the right at the bottom you'll see Import Folder -- click this and a window will open up.

    Open this zip file and copy/paste all of the contents of the java6update15.txt file it contains into the Import Folder window and click 'Import':

    http://files.kaseya.com/sftp/java6update15.zip

    Advisory on this new Java release:

    US-CERT Current Activity

    Sun Releases Update 15 for Java SE 6

    Original release date: August 5, 2009 at 11:19 am
    Last revised: August 5, 2009 at 11:19 am


    Sun has released update 15 for the Java SE JDK 6 and the Java SE JRE 6
    to address multiple vulnerabilities. These vulnerabilities may allow
    an attacker to execute arbitrary code, operate with escalated
    privileges, or bypass authentication methods.

    US-CERT encourages users and administrators to review the Java SE 6
    Update 15 release notes and apply any necessary updates to help
    mitigate the risks.

    Relevant Url(s):
    http://java.sun.com/javase/downloads/index.jsp

    http://java.sun.com/javase/6/webnotes/6u15.html

    Legacy Forum Name: Java 6 update 15 scripts...,
    Legacy Posted By Username: Benjamin.Lavalley@kaseya.com
  • I'm not exactly sure if you'd need both the 32-bit and 64-bit Java versions to account for 32-bit browsers on a 64-bit OS, either. If anyone has any answers on that feel free to comment Smile

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Benjamin.Lavalley@kaseya.com
  • Benjamin.Lavalley@kaseya.com
    I'm not exactly sure if you'd need both the 32-bit and 64-bit Java versions to account for 32-bit browsers on a 64-bit OS, either. If anyone has any answers on that feel free to comment Smile


    If you are using a 32-bit browser on a 64-bit OS you will need both version of Java installed. The default browser on 64-bit Windows is the 32-bit IE. I made a quick edit and changed the order of operations on your scripts so that 32bit and x64 are both installed on x64 systems. I also found that if IE is open during the install, it will fail. I've added a step to close IE.

    32bit install to Step 1
    OS type check to Step 2a
    64bit install to Step 2b

    Script Name: Java6u15 - (32 bit) - Step 1
    Script Description: Install Java 6 Update 15 Benjamin Lavalley, Sr. Sales Engineer, Kaseya benjamin.lavalley@kaseya.com

    ***EDITED BY Charles Surrett, Convergence Networks***

    IF Test Registry Key
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6.0_15
    Absent :
    THEN
    Get URL
    Parameter 1 : http://javadl.sun.com/webapps/download/AutoDL?BundleId=32800&/jre-6u15-windows-i586.exe
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\jre-6u15-windows-i586.exe
    Parameter 3 : 3
    OS Type : 13
    Close Application
    Parameter 1 : iexplore.exe
    OS Type : 13
    Execute Shell Command
    Parameter 1 : "#vAgentConfiguration.AgentTempDir#\jre-6u15-windows-i586.exe" /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0
    Parameter 2 : 1
    OS Type : 13
    Write Script Log Entry
    Parameter 1 : Java 6 Update 15 installed for x86.
    OS Type : 13
    Execute Script
    Parameter 1 : Java6u15 x64 Check - Step 2a (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 :
    Parameter 3 : 0
    OS Type : 13
    ELSE
    Write Script Log Entry
    Parameter 1 : Java 6 update 15 already installed.
    OS Type : 13


    Script Name: Java6u15 x64 Check - Step 2a
    Script Description: Install Java 6 Update 15. Determine OS type then install appropriate Java version. Benjamin Lavalley, Sr. Sales Engineer, Kaseya benjamin.lavalley@kaseya.com

    ***EDITED BY Charles Surrett, Convergence Networks***

    IF Check Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\Identifier
    Contains :x86
    THEN
    Write Script Log Entry
    Parameter 1 : 64-Bit OS Not Found
    OS Type : 0
    ELSE
    Execute Script
    Parameter 1 : Java6u15 - (64 bit) - Step 2b (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 :
    Parameter 3 : 0
    OS Type : 13



    Script Name: Java6u15 - (64 bit) - Step 2b
    Script Description: Install Java 6 Update 15 Benjamin Lavalley, Sr. Sales Engineer, Kaseya benjamin.lavalley@kaseya.com

    ***EDITED BY Charles Surrett, Convergence Networks***

    IF Test Registry Key
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\1.6.0_15
    Absent :
    THEN
    Get URL
    Parameter 1 : http://javadl.sun.com/webapps/download/AutoDL?BundleId=32802&/jre-6u15-windows-x64.exe
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\jre-6u15-windows-x64.exe
    Parameter 3 : 3
    OS Type : 13
    Close Application
    Parameter 1 : iexplore.exe
    OS Type : 13
    Execute Shell Command
    Parameter 1 : "#vAgentConfiguration.AgentTempDir#\jre-6u15-windows-x64.exe" /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0
    Parameter 2 : 1
    OS Type : 13
    Write Script Log Entry
    Parameter 1 : Java 6 Update 16 installed for x64.
    OS Type : 13
    ELSE
    Write Script Log Entry
    Parameter 1 : Java 6 Update 15 already installed.
    OS Type : 13



    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: cnwicsurrett
  • I just updated the scripts to install both 32 and 64-bit Java versions on a 64-bit OS -- in my Step 2b script I simply added in the steps to install the 32-bit version and 64-bit at the same time.

    As I was testing them, I realized that the 32-bit Java installer was NOT actually installing on a 64-bit OS. This is some sort of limitation with the 32-bit installer that may be related to system variables that are different in a 64-bit command shell.

    To make a long story short, I had to manually package up the contents of the installer and they will be downloaded from our site and installed via msiexec.

    If you grabbed the scripts previous to my updating this post (Thursday, August 6th, 2009 at 3:25PM EST) I would recommend deleting your current Java script folder and importing the new one from my post above.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Benjamin.Lavalley@kaseya.com
  • Do we still need to kill the Java quickstart service prior to installing or is it now taken care of automatically in the latest updates?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: ryan.odwyer
  • Hello,
    I modified the script to use Update 16. I see the file running on the test PC but does not seem to install. I have still have update 15...

    Any suggestions?

    Wally Hass

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: networkthinking
  • Hello,
    i also noticed when I ran Java -version before the script, I got the following:

    C:\Documents and Settings\>java -version
    java version "1.6.0_15"
    Java(TM) SE Runtime Environment (build 1.6.0_15-b02)
    Java HotSpot(TM) Client VM (build 14.1-b02, mixed mode, sharing)

    When I run Java -version now, I get an unknown command....

    Suggestions?

    Wally

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: networkthinking
  • Benjamin.Lavalley@kaseya.com

    To make a long story short, I had to manually package up the contents of the installer and they will be downloaded from our site and installed via msiexec.


    Ben,

    Thanks for finding this bug. Looks like it is still there in the 32bit jre-6u16 also. Simple enough to get the contents of data1.cab from the Sun installer. Any chance you could describe how you built the jre1.6.0_15.msi. So we can take on that task as new updates are released.

    A couple of other notes on the current scripts:

    You don't need to declare the filename in the url.

    URL for java6u16 32bit standalone
    http://javadl.sun.com/webapps/download/AutoDL?BundleId=33889&/

    URL for java6u16 standalone
    http://javadl.sun.com/webapps/download/AutoDL?BundleId=33892&/

    The registry check for the 32bit java version on a 64bit OS
    HKLM\SOFTWARE\wow6432node\JavaSoft\Java Runtime Environment\1.6.0_16

    Also posting a revised remove-java.vbs that will remove all version of 32/64bit java on both 32/64bit OSes.

    Thanks

    Vernon Southmayd
    Creative Computing

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: vernon@midmich.net
  • Ben, Thanks for providing these scripts they have saved me tons of time. I’m new to Kaseya scripting and the forums are a great place to learn.

    Charles, Thanks for your mods to the scripts.

    I started testing and ran into a few problems below:

    The close command failed with multiple ie windows open. I used a vbs script to close all ie windows.

    jqs.exe (java quick start) was running on a machine and caused the installer to complain about it being open. close jqs.exe worked fine in this case.

    I removed the call to the 64 bit java script. (we have very few machines running 64bit)

    Tested on XP, Vista, and Windows7

    Modified Script:
    Script Name: Java6u16 - (32 bit) - Step 1
    Script Description: Install Java 6 Update 16 Benjamin Lavalley, Sr. Sales Engineer, Kaseya benjamin.lavalley@kaseya.com

    ***EDITED BY Charles Surrett, Convergence Networks***

    ***Modified by Matt DeChicio, WingSwept Communications - added vbs script to close multiple ie windows, close jqs.exe (java quick start), removed call to jre 64bit version script***

    IF Test Registry Key
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6.0_16
    Absent :
    THEN
    Get URL
    Parameter 1 : http://javadl.sun.com/webapps/download/AutoDL?BundleId=33889&/
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\jre-6u16-windows-i586.exe
    Parameter 3 : 3
    OS Type : 13
    Close Application
    Parameter 1 : jqs.exe
    OS Type : 13
    Write File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\close_ie.vbs
    Parameter 2 : VSASharedFiles\close_ie.vbs
    OS Type : 13
    Execute File
    Parameter 1 : %windir%\system32\cscript.exe
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\close_ie.vbs
    Parameter 3 : 3
    OS Type : 13
    Execute Shell Command
    Parameter 1 : "#vAgentConfiguration.AgentTempDir#\jre-6u16-windows-i586.exe" /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0
    Parameter 2 : 1
    OS Type : 13
    Write Script Log Entry
    Parameter 1 : Java 6 Update 16 installed for x86.
    OS Type : 13
    ELSE
    Write Script Log Entry
    Parameter 1 : Java 6 update 16 already installed.
    OS Type : 13



    Code for close_ie.vbs

    Option Explicit

    Dim objProcesses, objProcess

    Set objProcesses = GetObject("WinMgmts:root/CIMV2").ExecQuery( _
    "SELECT * FROM Win32_Process WHERE Name='iexplore.exe'")

    For Each objProcess In objProcesses
    objProcess.Terminate
    Next


    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: WingSwept Support
  • Anyone put together scripts to update 17?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: sbbssoft
  • Anyone put together scripts to lift the update info from the Java webpage and make this problem go away? Now that'd be nice Smile

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: chris@busy.co.nz
  • Here is a project for creating an installer capable of installing [Java 6 Update 18] in 32-bit OR 64-bit:

    http://www.ryanvm.net/forum/viewtopic.php?t=3850&postdays=0&postorder=asc&start=0

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: SMason