10 Replies Latest reply on Nov 1, 2012 1:28 PM by scottk

    How to create a package to uninstall a program with Patch Manager?

    scottk

      I am trying to create a package to uninstall or remove Adobe Air (it has been determined that it isn’t used in my organization and we want to uninstall rather than keep patching), but haven’t had any success. I created a support ticket with SolarWinds support looking for some best practices or an example on how to create package that will uninstall any software (which I could use as a reference in creating the package to uninstall Adobe Air myself). I was told that “our knowledge of this function is very limited in the support dept” and suggested that I create a post in these forms.

       

      Any information would be greatly appreciated.

        • Re: How to create a package to uninstall a program with Patch Manager?
          antwesor

          scottk wrote:

           

          I am trying to create a package to uninstall or remove Adobe Air (it has been determined that it isn’t used in my organization and we want to uninstall rather than keep patching), but haven’t had any success. I created a support ticket with SolarWinds support looking for some best practices or an example on how to create package that will uninstall any software (which I could use as a reference in creating the package to uninstall Adobe Air myself). I was told that “our knowledge of this function is very limited in the support dept” and suggested that I create a post in these forms.

           

          Any information would be greatly appreciated.

          This has been something that I needed to do as well Scott. I had a need to remove the old Java from some Windows XP workstations and the solution our team came up with was to create an .exe that did the uninstall. It was removing the Obsolete Java engine from an earlier version of Windows XP. I think we used some kind of C++ compiler to create the commands to remove the Obsolete Java into an .exe file. We then used Patch Manager to publish the 'package' and it seemed to work quite well. Let me know if you need more details and I will try to post the details of the project here. Hope this helps in the meantime.

          Usually with Patch Manager the only way to remove a package is to have it installed with an MSI. I try to install using MSI's as much as possible so that I can use this feature.

            • Re: How to create a package to uninstall a program with Patch Manager?
              scottk

              I do have the MSI code for Adobe Air, but I have tried numerous different options in Package Boot and it all fails.  Can anyone get me a working example of using Package Boot to uninstall an application via its MSI code?

               

              Also, I will also need to figure something for JAVA 6 with its end of life by Oracle being February 2013.  After install JAVA 7 on a computer with JAVA 6, I noticed that JAVA 6 remains.  By February 2013, I need create a package with Patch Manager that will upgrade our JAVA 6 installs by install JAVA 7 and then uninstall JAVA 6.  Any suggestions on Package Boot configurations would be appreciated, especially since uninstalling via the MSI code doesn’t appear to work with my testing with Adobe Air.

                • Re: How to create a package to uninstall a program with Patch Manager?
                  jbaits

                  What version of patch manager are you using? With the new GUI editor for package boot in 1.8 it should be fairly straight forward. If you have 1.7 or below you need to add a line similar to this within the programs section of pre or post execution.

                   

                  <program type="msi"typeaction="uninstall"name="{Adobe-Air-MSI-Code-Here}"successcode="0"failureaction="stop"enabled="true">Any CLI Parameters Here</program>


                  I'd also check the uninstall string for Air in HKLM\Software\Microsoft\Windows\Current Version\Uninstall to see if there are any parameters you need to include.

                    • Re: How to create a package to uninstall a program with Patch Manager?
                      scottk

                      I am using Patch Manager 1.8 and tried that code in both the pre and post execution.  When I try to install the package I get different errors and the package fails.

                       

                      The registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{14DC0059-00F1-4F62-BD1A-AB23CD51A95E} has UninstallString with a value of MsiExec.exe /I{14DC0059-00F1-4F62-BD1A-AB23CD51A95E}.

                       

                      Below are some the variations I have tried with no success:

                       

                      <program failureaction="stop"enabled="true"name="{1DD463C0-A50A-4394-B7E4-5895C02F9E0D}"type="msi"typeaction="uninstall"enablemsilogging="false"successcode="0">/norestart</program>

                       

                      <program failureaction="stop"enabled="true"name="{14DC0059-00F1-4F62-BD1A-AB23CD51A95E}"type="msi"typeaction="uninstall"enablemsilogging="false"successcode="0">/I{14DC0059-00F1-4F62-BD1A-AB23CD51A95E}</program>

                       

                      <program failureaction="stop"enabled="true"name="{14DC0059-00F1-4F62-BD1A-AB23CD51A95E}"type="msi"typeaction="uninstall"enablemsilogging="false"pathtype="regprependpath"regpath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{14DC0059-00F1-4F62-BD1A-AB23CD51A95E}"regvalue="UninstallString"usewin32registry="true"successcode="0"> </program>

                       

                      Also what should the Apply Package section of the Package Boot have for an uninstall?

                        • Re: How to create a package to uninstall a program with Patch Manager?
                          jbaits

                          When I make an uninstall package I give patch manager a dummy exe that doesn't do anything and it will create the apply package string. As far as the uninstall commands not working, I'd turn up logging for package boot and sift through that. It's helped me find syntax errors and other issues before. On the machine you're testing with add these keys to the registry.

                           

                          [HKEY_LOCAL_MACHINE\SOFTWARE\EminentWare\Logging]

                          "Enable"=dword:00000001

                          "Level"=dword:00000003

                          "Options"=dword:00000003

                           

                          I just tested this exact line in package boot on one of my systems and Air was uninstalled without issue. I have a different MSI code than you but it's probably just a different version.

                           

                          <program failureaction="stop" enabled="true" name="{14DC0059-00F1-4F62-BD1A-AB23CD51A95E}" type="msi" typeaction="uninstall" successcode="0"></program>

                            • Re: How to create a package to uninstall a program with Patch Manager?
                              scottk

                              How do you create a dummy exe that you reference?  The test you did, was the uninstall in the pre or port execution?  Once I have that, I will try a new package with the logging enable on the client and see what happens.

                               

                              Thanks for your suggestions.

                                • Re: How to create a package to uninstall a program with Patch Manager?
                                  jbaits

                                  The dummy exe is just a couple second wait command in AutoIT that is compiled to an exe. I had the command in the preexecution but the same line should work either way. Good luck. If you still have a problem post your full XML and I'll take a look..

                                    • Re: How to create a package to uninstall a program with Patch Manager?
                                      scottk

                                      I ending up find sleep executable online (http://www.sleepcmd.com/).  I used the following code in post execution and it works.

                                       

                                      <program failureaction="stop"enabled="true"name="{14DC0059-00F1-4F62-BD1A-AB23CD51A95E}"type="msi"typeaction="uninstall"enablemsilogging="false"successcode="0"> </program>

                                       

                                      It turns out that we have at least two different MSI codes, so I created two packages so far.  I am wondering if there is a better way to handle this.

                                      1 of 1 people found this helpful
                                        • Re: How to create a package to uninstall a program with Patch Manager?
                                          jbaits

                                          I have some packages that have multiple uninstall actions before an install. You would have to change failureaction to continue and the package would report success no matter what happens if there's no actual install happening. It works but you'd have to use a seperate metadata package to track where Air is actually still installed.

                                          1 of 1 people found this helpful
                                            • Re: How to create a package to uninstall a program with Patch Manager?
                                              scottk

                                              Thanks for your suggestions jbaits.

                                               

                                              Since the two separate packages with different MSI codes for Adobe Air are working, I have no plans to combine them.  I will keep in mind that I can add multiple uninstall actions with the failureaction to continue.

                                               

                                              I also created my first metadata only package so I can detect which computers still have Adobe Air installed and it appears to be working as expected.

                                               

                                              After looking at options for a package to uninstall JAVA 6 and install JAVA 7, I think I have an approach that will work.  JAVA 6 appears to have only two MSI codes.  {26A24AE4-039D-4CA4-87B4-2F83216037FF} for x86 JAVA 6 installs on both x86 and x64 systems and {26A24AE4-039D-4CA4-87B4-2F86416037FF} for x64 JAVA 6 installs on x 64 systems.

                                               

                                              Plan on creating three packages:

                                              - JAVA 6 x86 on x86 systems. Preexecution to uninstall JAVA 6 x86 and failureaction to fail and then install latest version of JAVA 7 x86.

                                              - JAVA 6 x86 on x64 systems. Preexecution to uninstall JAVA 6 x86 and failureaction to fail and then install latest version of JAVA 7 x86 for x64 systems.

                                              - JAVA 6 x64 on x64 systems. Preexecution to uninstall JAVA 6 x64 and failureaction to fail and then install latest version of JAVA 7 x64.

                                               

                                              Any comments of suggestions on this approach would be appreciated.