Purpose
This document provides information about the processes that take place for dependent actions for Java patch installation with Protect or Shavlik Patch.
Note: When you see "DA" this refers to Dependent Action.
Description
During Java update installation, Protect and Shavlik Patch will use additional steps, or a "dependent action", to ensure installation is successful. Refer to the information below as a low level overview of steps that take place due to these dependent actions.
Java 7 update 71 and later will be using the similar pattern as Java 8 DA, but they are still separate DAs.
File you care about:
Legend:
JV = Java Version 7 or 8
ARCH = Architecture 32 or 64
Batch files:
Batch files -task.xml file
Batch file’s -task.xml file.
CL5 9.1 and later
If the uninstall Java batch file needs to be scheduled, it will add an entire into the Batch file’s -task.xml file. It will be executed in synchronously.
CL5 9.0 and earlier:
If the uninstall Java batch file needs to be scheduled, it will schedule a separate job and NOT use the Batch file’s -task.xml file. The jobs will be executed in asynchronously.
CL5.log
uninstallStringListJVxARCH_Before.bat – The list of Java uninstall versions before the patch was STATICally installed
uninstallStringListJVxARCH_After.txt – The list of Java uninstall versions after the patch was STATICally installed
uninstallStringListJVxARCH_CombinedSorted.txt – The combined and sorted list of uninstallStringListJVxARCH_Before.bat and uninstallStringListJVxARCH_After.txt
JavaJVxARCH_Static_Install.log – The Java install log
- installJavaJVxARCH.bat – Agent generated batch file. The agent cannot do all the batch file commands needed. So, it creates a batch file and executes it.
ununstallRegKeyJVx64.txt – Only applies to 64 bit Java. Writes out the uninstall registry key and the DA use it to search for what Java versions are installed.Schedule Job Names:JavaJVxARCHPostBootUninstall – Per 9.1 SDK scheduled job name. It will execute the uninstallStringListJVxARCH_Before.bat upon rebootHF_BOOT_TASK_JOB (INSTALL_STATE_UPDATE) - Post 9.1 SDK scheduled job name. It will execute the Batch files -task.xml file, which contains the uninstallStringListJVxARCH_Before.bat.The Pattern:
- 1) Obtains a current list of installed Java versions that correspond to the Java patch being installed. It writes the uninstall command line to uninstallStringListJVxARCH_Before.bat batch file. The DA looks for the corresponding Java version under the corresponding architecture uninstall registry.
Example, Java 7 Update 71 32 bit will look for Java 7 and Java 7 Update under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall on a 64 bit OS.
- 2) Installs the Java Patch STATICally with an install log file specified (JavaJVxARCH_Static_Install.log), which is written to the current working directory. This is not necessarily the PATHToFixes variable.
- 3) Does the same as number 1) above; however, it writes the uninstall command lines to uninstallStringListJVxARCH_After.txt text file. There should only be one extra uninstall command line in this file.
- 4) The 2 files are compared and if there is only 1 uninstall command line difference, then it will enter the uninstall routine.
- 5) Uninstall routines
- a. Java 7 update 71 and later uninstall routine:
It schedules uninstallStringListJVxARCH_Before.bat batch file from 1) above using the Shavlik Scheduler if it is installed; otherwise, the Microsoft Scheduler.If the job was scheduled (0 – success), it returns a 3010 – Reboot; otherwise, it returns the value for CL5 which is used to schedule the job.It does handle scheduler fails, because that is the only way we can uninstall previous versions of Java 7.
- b. Java 8 uninstall routine:
It loop through the uninstallStringListJVxARCH_Before.bat batch file from 1) above and executes each uninstall command line. If the uninstall return code is between 1600 and 1650, the uninstallStringListJVxARCH_Before.bat batch file from 1) above is scheduled using the Shavlik Scheduler if it is installed; otherwise, the Microsoft Scheduler
If the job was scheduled (0 – success), it returns a 3010 – Reboot.
It ignores all uninstall return codes outside 1600 to 1650 and any failures relating to scheduling the uninstallStringListJVxARCH_Before.bat, because the attempt to uninstall old Java 8 version will occur the next time they patch Java 8.
Important agent note:
Agents have a bug. The agent always deletes all the file after the patch has been installed. You can specific files not to be deleted, but it only applies to the last DA that uses Agent scripting. If you patch both Java 7 Update 71 32 bit and 64 bit and Java 8 32 bit and 64 bit and the last patch to deploy is Java 8 32 bit, all files not related to Java 8 32 bit will be delete. This will cause the Java 7 update 71 32 and 64 bit uninstalls to fail, because the batch files will not exist.
Affected Product(s)
Shavlik Protect
Shavlik Patch for SCCM