3 Replies Latest reply on Mar 17, 2015 11:10 AM by pjohnson

    Shavlik Protect - Remove Patches Folder

    pjohnson Rookie

      Hello everyone,

       

      I am attempting to remove the downloaded patches from several client pc's and I seem to have hit a road block. I am scanning the pc, than deploying the 'null patch' and using a deployment template with the following in the 'custom actions'

       

      -After All Patches- is selected and I have this under specify the command to execute: rm dir /s /q %pathtofixes%

       

      The pc gets scanned, the null patch is deployed with the deployment template but the files within the 'propatches' folder never get deleted.

       

      Any ideas???

       

      Thanks,

       

      Paul

        • 1. Re: Shavlik Protect - Remove Patches Folder
          SupportEmployee

          Hi Paul,

           

          If you're just attempting to delete the patches out of C:\Windows\Propatches\Patches on target machines - you can also accomplish this using a built-in feature by using a deployment template set to remove temp files after deployment.

           

          This setting is on the General tab > Deployment Actions > After - Remove temp files.

          Untitled.jpg

           

          If this is checked in the deployment template it will delete the patch files after deployment completes.

           

          I hope that helps.

          -Adam

          • 2. Re: Shavlik Protect - Remove Patches Folder
            SupportEmployee

            pjohnson wrote:

             

            -After All Patches- is selected and I have this under specify the command to execute: rm dir /s /q %pathtofixes%

             

             

            Hi, I tested this and it appears to work, but the syntax should have no space in rmdir, so it should be like this:

             

            rmdir /s /q %pathtofixes%

            or

            rmdir /s /q C:\Windows\Propatches\Patches

             

            Or you could also use this to delete all files within the folder instead of deleting the folder:

            del /s /q /f C:\Windows\Propatches\Patches\*

             

            Note that if any of the patch files are still in-use for any reason, access will be denied and the files will fail to delete.

             

            I hope that helps.

            -Adam

            1 of 1 people found this helpful
            • 3. Re: Shavlik Protect - Remove Patches Folder
              pjohnson Rookie

              Thanks Adam. I did notice that my syntax was wrong and I corrected it but I found the 'Remove temp files' option to be ideal as well.

               

              Thanks for your time,

               

              Paul