4 Replies Latest reply on Jun 9, 2017 1:19 PM by wsitte

    Run custom script




      I have recently installed and configured patch manager in my enterprise environment. I really like the third-party update functionality but I'm having some issues. Currently, I am testing the install of Java to get everyone to the latest version. Everything installs properly and looks good but it is leaving all old versions behind which is not good. I have seen of this forum people using the GUID codes to install versions of Java but this is also no good since this will take way too much effort to get this to work. All I am wanting this to do is run a simple batch file to uninstall all Java 8 versions and I know it works since I have tested on many different machines. It looks like this:


      wmic product where "name like 'Java 8%%'" call uninstall


      If I am not able to get this working then patch manager is a non starter for me since this still leaves our organization at a huge security risk. I have done pretty much every suggestion with using the Package Boot Helper but nothing I do seems to work. Can someone please tell me the correct syntax of how to get patch manager to run a simple script.




        • Re: Run custom script

          you just need to call cmd first so it should look more like this

          /c wmic product where "name like 'Java 8%%''" call uninstall /nointeractive

            • Re: Run custom script

              Thanks for the input. I have tried to do this and still not uninstalling, below is my current setup




              I also included the cmd.exe in my package and still not working. Ideally, I just want Patch Manager to call a batch or powershell script but that seems like a long shot.


              Any help would be greatly appreciated.



                • Re: Run custom script

                  When I ran the command via a command prompt it errored, so I modified it a bit until it got the correct results, looks like there was an extra ' in it:


                  wmic product where "name like 'Java 8%%'" call uninstall /nointeractive



                  Not sure what the /c was supposed to do, but that also errored, so I took that out.

                    • Re: Run custom script

                      Thanks. I took out the /c and made sure the command was setup with the correct amount of quotes. It still will not uninstall the old version so I'm at a loss. I opened a ticket with SolarWinds so hopefully they can resolve my issue.