5 Replies Latest reply: Nov 10, 2010 1:28 PM by hoeltermann RSS

    Java Update Difficulties

    junkyard44 Rookie

      We try to stay current be deloying the latest java updates whenever they are released. However there has been a bevy of obstacles we've had to over come.

       

      Issues

      1. Older versions of java required by some users for certain websites and programs
      2. Java installs fails if user is logged in and has a Java app open.
      3. Multiple older versions of Java remain
      4. After Java patch "successfully" installs some users get error messages after logging into Accellion. Accellion uses a java applet to upload files.

       

      Resolved but alway looking for a betther way

      1. Added registry key to machines that required older java version. Created a Custom definition to install latest Java version on machines that did not have the registry key
      2. Defer repair to after user is logged off
      3. Run uninstall batch job to remove old version of Java

       

      Unresolved Issue

      We have not been able to find a solution as to why some machines refuse to work with Accellion after java has been updated. This has been an issue with every update since 6 update 13. The user will have one of three errors after accellion login, IE window crashes, C++ error or the browse button does not function. The problem appears to be profile specific as other users can use Accelion on the affected machine. To manually resolve the issue we must, remove java, delete the users sun folder from their profile, restart and install java logged in as admin. Also giving the affected user temporary admin right and installing java seems to resolve this till the next update.

       

      Does anyone have any suggestion on how we can  improve this proces and resolve our Java\Accellion errors?

       

      Thank You

      Jeff

        • 1. Re: Java Update Difficulties
          Rookie

          Patch-in-place (as opposed to static) is now the default installation mode, but this was not the case prior to JRE 6update10.  So, you could see multiple entries for JRE/JDK in the Add/Remove control panel. 

           

          As to the installation failures, here's what happens during a completely silent install: During an in-place update (family install) within a user session, a dialog normally prompts the user to close IE if the browser is open (it will also ask you to stop the JQS service if it's still running). This is not the case with a completely silent install, ie. no warning dialogs appear. Instead, you will get an incomplete install-no ARP entry, no CPL.  What happens is that the older version gets removed-except for %PROGRAMFILES%\Java\JRE6\bin\MSVCR71.dll , which remains 'open'. As the Core.zip expands and begins to install the new files, it encounters the open file MSVCR71.dll and just stops-it doesn't reverse like a normal failed install. So you're left with a partial install.  

          I've filed a bug report with Sun. A group policy computer startup script would do the job, but we're still looking to patch with LanDesk.                        

           

           

          References:

          http://java.sun.com/javase/6/docs/technotes/guides/jweb/otherFeatures/jre_install.html

          http://java.sun.com/javase/6/webnotes/6u11.html

          • 2. Re: Java Update Difficulties
            Apprentice

            I really start hating thoses crappy JRE-Updates. The only workaround that helped in my environment was a vbscript, which looks for running IE-, Firefox- and Javaprocesses. The script then nags the user to close all apps, which might have fired a java process (like ie, etc). If there is no java.exe running anymore i start an uninstall-batch with tons of "msiexec /X <guid>" commands in it to remove all the old installations.If all that is done the batch starts the installation of the new version.

             

            It kinda sucks ... but works best for me.

            • 3. Re: Java Update Difficulties
              cyberdemon Apprentice

              Hoeltermann,

               

              Would you be willing to share your .vbs file with me? I'm in the same boat as these questions/issues and I'm willing to give this a try in my environment as well.

              please let me know.

               

              thanks,

               

              cyberdemon

              • 4. Re: Java Update Difficulties
                JDarrah Apprentice

                I'd like to check out the vbscript also please!

                • 5. Re: Java Update Difficulties
                  Apprentice

                  Okay. Here you go.

                   

                  Usage:

                   

                  cscript end_apps.vbs <app1;app2;app3> <waiting time in seconds> <message>

                  eg cscript end_apps.vbs firefox;iexplore 600 please close all of your browser windows now ... java needs some patches!

                   

                   

                  Set WshShell = WScript.CreateObject("WScript.Shell")
                  Set fso = CreateObject("Scripting.FileSystemObject")
                  Const ForReading = 1, ForWriting = 2, ForAppending = 8


                  on error resume next

                   

                  systemroot = WsHShell.expandenvironmentstrings("%SystemRoot%")
                  programfiles = WsHShell.expandenvironmentstrings("%ProgramFiles%")


                  ' 1 = processes
                  ' 2 = wait time
                  ' 3+ = message


                  Set objArgs = WScript.Arguments

                  arg_process = objArgs(0)
                  arg_time = CInt(objArgs(1))

                   

                  For I = 2 to objArgs.Count - 1
                     arg_message = arg_message & " " & objArgs(I)
                  Next

                   

                  arg_message = trim(arg_message)

                  arg_process_array = split(arg_process, ";")

                   

                  wscript.echo now & " - script started."
                  wscript.echo

                  wscript.echo "arg_process: " & arg_process
                  wscript.echo "arg_time: " & arg_time
                  wscript.echo "arg_message: " & arg_message
                  wscript.echo

                   

                  app_is_running = true
                  loop_count = 0

                   

                      for arg_process_array_count = 0 to ubound(arg_process_array)
                          arg_process = arg_process_array(arg_process_array_count)
                          set svc=getobject("winmgmts:root\cimv2")
                          sQuery="select * from win32_process where name like '%" & arg_process & "%'"
                          set cproc=svc.execquery(sQuery)
                          iniproc = iniproc + cproc.count
                          wscript.echo arg_process & " processes running: " & cproc.count
                          loop_count = loop_count + 1
                      next

                   

                      wscript.echo "total processes running: " & iniproc
                     
                      if iniproc > 0 then
                         
                          if len(arg_message) > 2 then
                              wscript.echo "informing user via msgbox ..."
                              msgbox_return = MsgBox (arg_message, 64, " IS - Software Deployment")
                          else
                              wscript.echo "no message to display. skiping messagebox."
                          end if
                     
                      else
                          wscript.echo arg_process & " not running. ending script."
                          wscript.quit     
                      end if

                   

                  wscript.echo
                  wscript.echo "Waiting " & arg_time & " seconds for all processes to finish."

                   

                  wait_count = 1


                  Do While iniproc > 0
                      if wait_count = 1 then
                      wscript.echo now & " - now starting to wait ..."
                      end if

                   

                      wscript.sleep 1000
                      iniproc = 0
                      for arg_process_array_count = 0 to ubound(arg_process_array)
                          arg_process = arg_process_array(arg_process_array_count)
                          set svc=getobject("winmgmts:root\cimv2")
                          sQuery="select * from win32_process where name like '%" & arg_process & "%'"
                          set cproc=svc.execquery(sQuery)
                          iniproc = iniproc + cproc.count
                      next           

                   

                      wait_count = wait_count + 1

                   

                      if wait_count > arg_time then
                        wscript.echo
                        wscript.echo now & " - done. timeout. " & iniproc & " processes still running."
                        Set flag = fso.OpenTextFile("PROCESS_TIMEOUT.dh", forwriting, true)
                        flag.Close
                        wscript.quit 0
                      end if
                  Loop

                   

                  wscript.echo "script done. All processes ended in time."
                  set cproc=nothing
                  set svc=nothing

                   

                  wscript.echo
                  wscript.echo now & " - script finished."
                  wscript.quit 0