Kaseya Community

Need procedure to update Java on endpoints

  • Yes, only the Pro version can be scripted.  It is $20 for 100 from Ninite.

  • JavaUpdater.zip

    Rajeev - The vbscript in the attached zip file will download the Java Update files to the following folder which must exist - C:\Temp. If you wish to download to a different folder just change this line in the VBScript to your desired download folder and save the changes:

    FileStore="C:\temp"

    After the files are downloaded the client is updated silently. The client is not rebooted.

    Please note that the script was created by another and I've left the attribution to the original author in place.

  • Thanks Zippo, much appreciate your help. I will get it going soon. Thanks again.

  • Can you please correct below xml and guide what is wrong in this. Because update never happened. UAC and win FW is disabled, and procedure execution show completed successfully. But at endpoint I can only see the JavaUpdate.vbs transferred nothing more than that.

    <?xml version="1.0" encoding="UTF-8"?>

    -<ScriptExport xmlns="www.kaseya.com/.../Scripting" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">-<Procedure treeFullPath="myProcedures - rajeev.java updater" folderId="393643047564496" id="1564187201" treePres="3" name="update-java">-<Body description="">-<If description=""><Condition name="True"/>-<Then>-<Statement name="WriteFile" continueOnFail="false"><Parameter name="Path" value="c:\temp\JavaUpdater.vbs" xsi:type="StringParameter"/><Parameter name="ManagedFile" value="VSASharedFiles\JavaUpdater.vbs" xsi:type="StringParameter"/><Parameter name="DeleteAfter" value="False" xsi:type="BooleanParameter"/></Statement>-<Statement name="Execute VBScript" continueOnFail="false" osType="Windows"><Parameter name="Parameter1" value="cscript /nologo c:\temp\JavaUpdater.vbs" xsi:type="StringParameter"/><Parameter name="Parameter2" value="/s" xsi:type="StringParameter"/><Parameter name="Parameter3" value="False" xsi:type="StringParameter"/></Statement></Then></If></Body></Procedure></ScriptExport>

  • Hi Rajeev

    In your Procedure - after writing the file to the client and before executing the vbscript add a line to "Impersonate User" and use a user with administrative privileges on the machine. Let us know if that helps.

  • Since they changed between 7 and 8 here are the switches I use for Java RE 8;

    AUTO_UPDATE=0 EULA=0 INSTALL_SILENT=1 REBOOT=0 WEB_ANALYTICS=0 /L "#vAgentConfiguration.AgentTempDir#\Temp\JavaSetup.log"

  • @zippo that clue worked smooth like butter.... Thanks ton dear.

    Thanks for the update HardKnoX,

  • I use the below combined with a direct links from www.klaus-hartnegg.de/.../download.html. I copy the procedure and update the link for each new version. I then update another procedure called Update to Latest that runs on new agents and weekly before Windows Updates. Do the same thing with Flash and Reader. Working pretty well

    <?xml version="1.0" encoding="UTF-8"?>

    -<ScriptExport xmlns="www.kaseya.com/.../Scripting" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">

    -<Procedure treeFullPath="Software Management.Java" folderId="427994221648198" id="1246811566" treePres="3" name="Java 8u31 x86">

    -<Body description="Download and install Java 8u31 x86">

    -<Statement name="ExecuteScript" continueOnFail="false">

    <Parameter name="ScriptID" value="1021794418" xsi:type="StringParameter"/>

    <Parameter name="ScriptName" value="Set c:\kworking\temp" xsi:type="StringParameter"/>

    <Parameter name="TimeDelay" value="" xsi:type="StringParameter"/>

    <Parameter name="TimeUnit" value="Immediate" xsi:type="EnumParameter"/>

    </Statement>

    -<Statement name="GetURL" continueOnFail="false">

    <Parameter name="URL" value="javadl.sun.com/.../AutoDL xsi:type="StringParameter"/>

    <Parameter name="ResponseFileName" value="#vAgentConfiguration.AgentTempDir#\temp\java.exe" xsi:type="StringParameter"/>

    <Parameter name="WaitComplete" value="True" xsi:type="BooleanParameter"/>

    </Statement>

    -<Statement name="ExecuteFile" continueOnFail="false">

    <Parameter name="Path" value="#vAgentConfiguration.AgentTempDir#\temp\java.exe" xsi:type="StringParameter"/>

    <Parameter name="Arguments" value="/s" xsi:type="StringParameter"/>

    <Parameter name="ExecuteAccount" value="System" xsi:type="EnumParameter"/>

    <Parameter name="WaitComplete" value="True" xsi:type="BooleanParameter"/>

    </Statement>

    -<Statement name="DeleteFile" continueOnFail="false">

    <Parameter name="Path" value="#vAgentConfiguration.AgentTempDir#\temp\java.exe" xsi:type="StringParameter"/>

    </Statement>

    </Body>

    </Procedure>

    </ScriptExport>

    Forgot to include the procedure it calls to create the temp folder

    <?xml version="1.0" encoding="UTF-8"?>

    -<ScriptExport xmlns="http://www.kaseya.com/vsa/2008/12/Scripting" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


    -<Procedure treeFullPath="Initial Configuration (Don't Change)" folderId="777374394413723" id="1021794418" treePres="3" name="Set c:\kworking\temp">


    -<Body description="">


    -<Statement name="ExecuteShellCommand" continueOnFail="false">

    <Parameter name="Command" value="if not exist "#vAgentConfiguration.AgentTempDir#\temp" mkdir "#vAgentConfiguration.AgentTempDir#\temp"" xsi:type="StringParameter"/>

    <Parameter name="ExecuteAccount" value="System" xsi:type="EnumParameter"/>

    <Parameter name="Is64Bit" value="False" xsi:type="BooleanParameter"/>

    </Statement>

    </Body>

    </Procedure>

    </ScriptExport>



    ... i fail at posting apparently
    [edited by: Rusty Franks at 5:52 AM (GMT -7) on Mar 27, 2015]