Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7169839

Java MSI install - repair/reinstall allowed, but does not perform as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 7
    • install
    • x86
    • windows_7

      FULL PRODUCT VERSION :
      Java 7 Update 4 (build 22)
      Java 6 Update 31
      Java 6 Update 32

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 7 Service Pack 1

      A DESCRIPTION OF THE PROBLEM :
      The Java MSI installer is poorly configured.
        Bug ID 6947907 is another report of this problem, but no action has been taken in the last two years to resolve it.
      The use of the Java MSI installer obtained as per instructions at http://www.java.com/en/download/faq/msi.xml breaks or removes the Java installation if the install or repair command is used on a computer that already has the same version of Java installed.
      This error caused problems and led to the removal of Java on over 2000 systems at my company.
      This error means that extra work must be done to prevent the installer from running more than once on a single computer system.

      An MSI transform can be made to work around this problem, but it cannot solve issues created by users downloading and installing Java directly from Java.com, due to MSI caching by Windows.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Extract the MSI from the Java Installer
      2. Run the MSI install for Java:
               msiexec /i jre1.7.0_04.msi /qn
      3. Run the MSI install for Java again:
               msiexec /i jre1.7.0_04.msi /qn

      The switch for silent installation changes the effect, but not the result.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The Java installation should appear as it was before, with 'java.exe' and 'javaw.exe' located in the 'jre7\bin\' directory, and without 'core.zip' and 'patchjre.exe' in the 'jre7\' directory.
      ACTUAL -
      Two possible results:
      If ran without the silent switches, Java is uninstalled, and not reinstalled, and MSIEXEC exits with error 1602.
      If ran with the silent switches, Java files are deleted ('jre7\bin\' is empty), and 'core.zip' and 'patchjre.exe' are placed in 'jre7\'.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      When run with full GUI:
      Action start 16:34:28: uninstall.
      MSI (c) (78:BC) [16:34:28:214]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'uninstall'
      Action ended 16:35:02: uninstall. Return value 1.
      MSI (c) (78:BC) [16:35:02:489]: Doing action: SetReinstall
      Action 16:35:02: SetReinstall.
      Action start 16:35:02: SetReinstall.
      MSI (c) (78:BC) [16:35:02:489]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'SetReinstall'
      MSI (c) (78:98) [16:35:02:582]: Invoking remote custom action. DLL: C:\Users\______\AppData\Local\Temp\MSI643B.tmp, Entrypoint: SetReinstall
      Action ended 16:35:02: SetReinstall. Return value 1.
      Action ended 16:35:02: reinstalldialog. Return value 2.
      MSI (c) (78:70) [16:35:02:582]: Skipping action: SetupInterrupted (condition is false)
      Action ended 16:35:02: INSTALL. Return value 2.



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      MSI packaging problem. No Java code involved.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Edit jre1.7.0_04.msi:
      Table 'InstallExecuteSequence', row 'InstallJava':
      Change condition from "NOT Installed" to 'NOT REMOVE And MODE<>"U"'
      (This fixes all silent installations)

      Change 'reinstalldialog' to report that Java is already installed, and setup will now exit. Provide a single 'OK' button that exits the installation.

      The above changes, made in a single MSI transform, works with Java 6 Update 31, Java 6 Update 32, and Java 7 Update 4 MSI installers.

            billyh William Harnois
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: