Kaseya Community

Java Updates

  • How is everyone taking care of java updates? Are you creating silent installs for each update that is released?

    anyone have any scripts to share?

    Legacy Forum Name: Java Updates,
    Legacy Posted By Username: Resistance2Fly
  • This my first attempt at Kaseya scripting, but it was been working for us.

    Script Name: Deploy Java6-i386
    Script Description: Deploy Sun Java - This will download the file from the KServer and install it silently. Please note, this file is 15mb in size, so for larger cilents please create a script to download the file to their server and then deploy it to the workstations!


    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : AgentTemp
    OS Type : 0
    Delete File
    Parameter 1 : %SystemRoot%\system32\java-install.log
    OS Type : 1
    Write File
    Parameter 1 : #AgentTemp#\jre-6u7-windows-i586-p.exe
    Parameter 2 : VSASharedFiles\jre-6u7-windows-i586-p.exe
    OS Type : 1
    Execute File
    Parameter 1 : #AgentTemp#\jre-6u7-windows-i586-p.exe
    Parameter 2 : /quiet /norestart /log java-install.log
    Parameter 3 : 3
    OS Type : 1
    Get File
    Parameter 1 : %SystemRoot%\system32\java-install.log
    Parameter 2 : java-install.log
    Parameter 3 : 1
    OS Type : 1
    Delete File
    Parameter 1 : #AgentTemp#\jre-6u7-windows-i586-p.exe
    OS Type : 1
    Delete Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SunJavaUpdateSched
    OS Type : 1
    Write Script Log Entry
    Parameter 1 : Java Upgrade 6u7 Success
    OS Type : 1
    ELSE

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: vernon@midmich.net
  • Do you think this will work for all future java updates?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Resistance2Fly
  • As it is written it is version specific. You could rename the exe download to a generic filename and modify the script to download and process the generic filename. This way you could push the new version file up to the Kserver overwriting the outdated version.

    Problem is there is no workstation version checking, so you need to be aware there is a new version upload the exe and force the script update. Also this does nothing about removing older versions.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: vernon@midmich.net
  • Hey Guys,

    I found this article on another site that has a script for this.

    http://incomservice.net/icsblog/tag/batch-file/

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: trnetwork
  • Wow, this is genius!

    Great find, thanks!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Resistance2Fly
  • Does anyone know the Registry key and value to set so that Check for Updates Automatically is unchecked ?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: lwolf
  • The key is:
    HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy

    The Value name is:
    EnableAutoUpdateCheck

    If the value is missing, then AutoUpdateCheck is enabled. If the value us present, then AutoUpdateCheck is disabled. The problem is the actual value of the key, which is a fairly long binary... It appears to always start with "01 00 00 00", but I don't know if the rest of the value is identical for each machine or a unique thing...

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Lmhansen
  • On my Windows XP Pro test computer, I installed Java v6u7 using the script above.

    Then I looked at HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy\EnableAutoUpdateCheck and observed it was set to 1.

    Then I went to Control Panel->Java, and selected the Update tab. The checkbox was checked for Check for Updates Automatically, and Notify Me was set to Before Downloading.

    I unchecked the checkbox for Check for Updates Automatically, and selected Never Check from the popup window, clicked Apply and OK.

    Then I went back to the Registry and looked at HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy\EnableAutoUpdateCheck and observed it was still set to 1.

    In fact, I couldn't see any changes being made to any of the values under HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy\

    Any other info or ideas?

    As Always, thansk in advance.

    Lloyd

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: lwolf
  • One more piece of info....

    when I renamed EnableAutoUpdateCheck under HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy\EnableAutoUpdateCheck to xxEnableAutoUpdateCheck, and went back to Control Panel->Java, the Update tab disappeared.

    When I renamed xxEnableAutoUpdateCheck back to the original EnableAutoUpdateCheck, the Update tab re-appeared again.

    Lloyd

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