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

Parameters not getting passed to MsiExec.exe on WinXP using Runtime.exec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 7u25
    • core-libs

      FULL PRODUCT VERSION :
      java version " 1.7.0_25 "
      Java(TM) SE Runtime Environment (build 1.7.0_25-b16)
      Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP Professional Version 2002 Service Pack 3

      A DESCRIPTION OF THE PROBLEM :
      We have an EXE for installation of required components on user's machine which has JRE 7u25 installed. When user hits our URL from Internet Explorer, an applet is launched which is used to download and run the EXE. Parameters are passed to this EXE using exec method of java.lang.Runtime. The argument passed(command to be executed) to the method is as follows:

       " C:\Documents and Settings\user1\Temp\Installation.exe " /v " ISALLUNINSTALL= " 1 " CLEANCACHE= " 0 " "

      The installation works properly for Windows 7 and Windows 8 but fails on Windows XP machine. A popup dialog is displayed with all the command line parameters. If the command is executed from command prompt, it works. The issue is observed only on Windows XP and for JRE 7u25. The installation was working properly for JRE7u9.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Pre-requisites: JRE7u25 is installed on Windows XP machine
      1. Create an EXE which requires more than one parameters.
      2. Execute the EXE from applet code using Runtime.exec method by passing command as mentioned above.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The parameters should get passed properly to the EXE.
      ACTUAL -
      A popup dialog is displayed with all the command line parameters listed.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      String installer = " \ " " + System.getenv( " USERPROFILE " ) + " \\Temp\\Installation.exe\ " " ;
      String arguments = " /v\ " ISALLUNINSTALL=\ " " + 1 + " \ " CLEANCACHE=\ " " + 0 + " \ " \ " " ;
      Process p = Runtime.getRuntime().exec(installer + arguments);
      p.waitFor();
      ---------- END SOURCE ----------

            uta Alexey Utkin (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: