6 Replies Latest reply on Aug 18, 2016 2:18 PM by aaron.s

    Uninstalling FMP 15 via Script in SCCM 2012

    aaron.s

      Hello all,

       

      My company is in the process of upgrading our servers to FileMaker 15. My job is to automate the installation of the FMP 15 client to the individual user's computers. To do this we use SCCM 2012 as we have over 300 systems to install this to. I have the install working fine (deployed as an Application, not a Package), but I need to make an uninstall script for the client just in case. To do this I have written the following batch file:

       

      REM ------Remove Extensions------

      del "C:\Program Files (x86)\FileMaker\FileMaker Pro 15\Extensions\" /Q

      rd "%userprofile%\AppData\Local\FileMaker\FileMaker Pro\15.0\" /Q /S

      rd "c:\ProgramData\FileMaker\FileMaker Pro\15.0\ /Q /S

       

      REM ------Uninstall FMP 15------

      REM FMP Version 15.0.1.119

      MsiExec /x {D5F969A0-E004-4A61-9CD6-F99CC9D32325} /qn

       

      We have some plugins that we use, so the first section removes those. The second section uninstalls the program itself. When this is deployed via SCCM the script executes the first section fine, but when it gets to the uninstall part it just skips it, leaving the program on the computer. When i run this batch file locally it works perfectly. I have even tried ignoring the script and putting the uninstall part directly into SCCM and it skips it that way too. The logs say that the identifier key is wrong, but when I check the registry, which is where I got it from, they are exactly the same.

       

      Any assistance would be greatly appreciated.

      Thanks,

      Aaron

        • 1. Re: Uninstalling FMP 15 via Script in SCCM 2012
          Johan Hedman

          For handling Plugins, use the script step to install those instead of putting them at the right place during installation. Then you dont have to think about removing them after uninstallation

          • 2. Re: Uninstalling FMP 15 via Script in SCCM 2012
            davidfencik

            This is what we used for uninstalling FMP11:

             

            taskkill /f /fi "IMAGENAME eq Filemaker*"

            start /wait msiexec.exe /x "\\networkpathtoinstaller\FileMaker Pro 11.msi" ALLUSERS=1 /passive /norestart

             

            Hope that helps!

             

            Dave

            • 3. Re: Uninstalling FMP 15 via Script in SCCM 2012
              Johan Hedman

              You dont need

              del "C:\Program Files (x86)\FileMaker\FileMaker Pro 15\Extensions\" /Q

              if you install your plugins with FileMakers Script step Install plugin. That will install your plugins at local users folder that you dont need to delete if you really dont want to because after uninstalling FMP15 no other software will look at that folder

              • 4. Re: Uninstalling FMP 15 via Script in SCCM 2012
                aaron.s

                Thanks for the responses. I'll take a look into the script step, I was unaware of this.

                 

                davidfencik, I can uninstall FMP 11, 12 and 13 this way, but for some reason I'm having an issue with doing the exact same thing the same way in 15.

                 

                Any other ideas?

                • 5. Re: Uninstalling FMP 15 via Script in SCCM 2012
                  davidfencik

                  We ran into weird issues with previous versions.  We had to try various combinations of using start.exe and the different switches to get it to work just right.  It seemed that in some cases output would go to stdout and in others stderr.  Maybe that has something to do with sccm failing to execute.

                   

                  You could just try leaving the old version of FMP on the machine when installing FMP15.  You could script removal of the shortcuts.  If you went down that route, I guess you could script the rest of the uninstall yourself, too.

                   

                  Dave

                  • 6. Re: Uninstalling FMP 15 via Script in SCCM 2012
                    aaron.s

                    Thanks for the help, but I ended up figure out a different avenue: Run Once in the registry!

                     

                    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce" /v "REMOVE FMP Version 15.0.1.119" /d "MsiExec.exe /x {D5F969A0-E004-4A61-9CD6-F99CC9D32325} /qn" /f

                     

                    If you run this from an elevated command prompt it will add the uninstall request to the registry and the next time the person logs off and back on the program will uninstall itself. Make sure to check the parts in red and verify it is correct for your version. This will work for any version from 11-15 (I have tested all of mine on it).