5 Replies Latest reply on May 6, 2015 8:55 AM by frgpugs

    Java Question

    jhungerford8887

      I am tinkering and trying to find out if it is possible to do a mass uninstall of different versions of Java on our network.  I have the java 8 update 45 and set it to install but I am having trouble getting the uninstall to work first.  Any suggestions on removing different versions of Java from the network with patch manager?   I was thinking about maybe writing a script or something and seeing if I could get that to work.

       

      Thanks

        • Re: Java Question
          frgpugs

          To do it in PM you need to publish the update you want removed

          Go to All Computers or whichever target group you would like and right click it and select update management

          Expand the tree on the left and find the update you would like to uninstall.  Double click it when it appears in the top box to add it to the bottom box.

          Highlight the update and change the drop down box for Action to uninstall.  Choose any reboot options if needed and click ok

          Select finish and hope that it actually works with the detection logic

           

           

          I found its much easier and more reliable to use PSExec

          PsExec.exe @(DOCUMENT.TXT) -h -u (DOMAIN\ADMIN ACCOUNT) MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218025F0} /qn  which is for J 8u25

          PsExec.exe @(DOCUMENT.TXT) -h -u (DOMAIN\ADMIN ACCOUNT) MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218031F0} /qn is for J 8u31

          • Re: Java Question
            chaldz

            Search these forums, you'll find discussions about using the following lines.  These is the easiest way to get rid of everything.  This what I did.  Now for each Java release, I modify the new package to perform a MSI uninstall of the previous release.  Keeps it clean.

             

            Target 32 bit install: wmic product where "name like 'Java 7%%' AND NOT name like '%%(64-bit)'" call uninstall /nointeractive

            Target 64 bit install: wmic product where "name like 'Java 7%%' AND name like '%%(64-bit)'" call uninstall /nointeractive

              • Re: Java Question
                jhungerford8887

                I appreciate the help.  I ran the script and it works for the pcs.  I am also using PS EXEC as frgpugs suggested to above.  Thanks to both of you for the assistance.

                • Re: Java Question
                  dkunkle84

                  Where exactly do you put these commands in the new package?

                    • Re: Java Question
                      frgpugs

                      PSExec is a CLI tool you run from a command prompt.  Running the MSI uninstaller to remove the previous version is done by editing the packageboot .

                      When you go to publish a package right click on it and select edit.  Youll get to a screen that has a check box for use package boot helper to install and then on the right side is a little green shield icon which you click on to open the package boot editor.  Go to the section at the bottom for after package is run or whatever its called and click add to add an action to run a file.  Click the button for uninstall MSI and in the box enter the string for the old version of java like 26A24AE4-039D-4CA4-87B4-2F83218025F0 for 8u25.  Save it, and then publish it.