Catalog Release History

We help you save time, money and improve your IT security

Version 4 has been released please see: https://patchmypc.com/java-wrapper-script-version-4 for the current script version.

We have received feedback related to only allowing the upgrade of Java runtime environment when Internet Explorer, Chrome, Opera, and Firefox are not open. If browsers are open during a Java update, it can cause issues during a Java update in some scenarios.

In order to work workaround to this problem, we created a self-extractable .exe file (SFX installer) that will use a wrapper script (VBScript) that can optionally perform various checks prior to calling the Java installer.

Starting with updates Java 7 Update 71 V2, Java 7 Update 71 (64-bit) V2, Java 8 Update 25 V2, Java 8 Update 25 a(64-bit) V2, we will be usuing version 3 of the Java wrapper script.

Please review Version 1 and Version 2 release notes if needed.

Java Wrapper Script Version 3 ChangeLog:

  • The Command line arguments no longer have to be in a specific order
  • New Command line arguments
    • /kill – this argument will kill any open internet browsers (Internet Explorer, Firefox, Chrome, and Opera) prior to installing Java. This should only be used when proper communication has been sent to end users. This could cause loss of data if users are actively working in the internet browsers.
    • /skipuninstall – by default, Java 8 Update 20 and newer will no longer remove previous Java 8. Version 3 of the Java Wrapper Script will automatically detect and uninstall any previous versions of Java 8. This argument can be used to skip the uninstall feature and will cause previous Java 8 versions to remain on the machine.
    • /dontdisableupdates – this can be used to disable our feature that will disable the automatic update check within Java.
  • Logging will now be in a format used by the CMTrace.exe tool from Configuration Manager
  • Opera support has been added when using the /checkforconflicts argument
  • The NOSTARTMENU=1 has been added as a argument for the Java installer
  • Improved logging

Command Line Argument Supported In Version 3:

 The following Command line arguments are supported in Version 3:

  • /checkforconflicts – this command line argument  will tell the wrapper script to check if (Internet Explorer, Firefox, Chrome, or Opera) is running. This will recheck every minute if browsers are running for however many minutes you specify. You specify the minutes by adding a integer number in the command line argument after the /checkforconflicts. In order for the browser check to work, both the /checkforconflicts and an integer number must be defined in the command line argument. For example, you could use /checkforconflicts 120 to specify a browser check for up to 120 minutes. If the time limit is reached and browsers aren’t closed, the script will exit with exit code 1618 or 0x87D00664 (Updates handler job was cancelled) in Configuration Manager and the Java update will not be installed. The update installation should retry based on the “Software Update deployment re-evaluation” schedule.
  • /kill – this command line argument will kill any open internet browsers (Internet Explorer, Firefox, Chrome, and Opera) prior to installing Java. This should only be used when proper communication has been sent to end users. This could cause loss of data if users are actively working in the internet browsers. When using this command line argument, there is no need to use the /checkforconflicts command line argument.
  • /skipuninstall – by default, Java 8 Update 20 and newer will no longer remove previous Java 8. Version 3 of the Java Wrapper Script will automatically detect and uninstall any previous versions of Java 8. This argument can be used to skip the uninstall feature and will cause previous Java 8 versions to remain on the machine.
  • /dontdisableupdates – this can be used to disable our feature that will disable the automatic update check within Java.

How To Use The Java Wrapper Script:

By default, we do not publish our catalog to use any of the command line arguments offered in our Java wrapper script. This means we will simply call the Java installer from our wrapper script.

If you would like to use any of these options, you will need to edit the command line in the SCUP 2011 console prior to publishing the update to WSUS.

Here is a sample screen shot to show how you could enable a browser check for up to 120 minutes.

CommandLineSCUP

When using the /checkforconflicts command line argument, you should increase the maximum run time for the update in Configuration Manager. By default, the maximum runtime will be set to 5 or 10 minutes in Configuration Manager.

You can increase the maximum update runtime in the Configuration Manager console in the properties of the update as shown below:

Runtime

Note: The maximum runtime in Configuration Manager should always be at least two minutes longer than the value you specify in the command line argument.

If the maximum runtime in Configuration Manager is shorter than the value you specify in the command line argument, the Configuration Manager client stops monitoring the update install. The Configuration Manager client will not close the wrapper script when the maximum runtime is complete.

The script will still be running and  will be monitored by the Windows update agent. This will cause any updates after the Java update to fail until script exits and the Windows update agent is free to perform another installation. This is why it is important to ensure the maximum runtime in Configuration Manager is longer than the value you specify in the command line argument.

If you notice Java updates are failing with code 0x87D00664, it means the maximum time was reached.

Error

If there are other updates that try to install after Java reached the maximum runtime, you will likely see error 0x87D00705 (Pause state required).

If the update fails with error code 0x87D00668 (Software update still detected as actionable after apply), it’s likely due to the script reaching the max minutes you defied and exiting before the Java installer was called.

Failed

Logging:

The script will create a log here: C:\Windows\PatchMyPC_jreversion.msi_Install.log. This log will be in a format used by CMTrace.exe and will contain the logging for the wrapper script. Below is a sample of the log:

Test

The script will also create a verbose log for the actual Java MSI installer file here: C:\Windows\Temp\PatchMyPC_jreversion_x86.msi_Verbose.log

We use the following command line arguments for the Java MSI installer:

/L*v %temp%\PatchMyPC_jreversion.msi_Verbose.log /qn AUTOUPDATECHECK=0 JAVAUPDATE=0 IEXPLORER=1 NOSTARTMENU=1 REBOOT=ReallySuppress