How can I mass clean the Patches dir with a GPO?

How can I delete all of the contents of the c:\ProgramData\Dell\KACE\patches dir with a GPO over night on machines that won't be rebooted or logged off and on again?

We had to migrate to a new OVF and we're getting error (Handshake Failed) when deploying patches. Cleaning the patches directory seems to correct this. We have 200 servers I need to patch tomorrow and Friday, but we also have 1500 clients that need patches. We'll need to deploy something to correct this on all machines, but many rarely reboot. Plenty still aren't even logged off of.  i.e. Medical research...

Thanks for any help or suggestions.

1 Comment   [ + ] Show comment
  • You could also try a script in KACE to purge that directory and set it to run during the night with the option to "Also run once at next device checkin" in case the PC is offline at the time. - DaveMT 4 years ago

Answers (2)

Posted by: rockhead44 4 years ago
Red Belt
I have never done this but it seems like this would work for you. Upload a batch file with the path to delete the folder you desire and execute it immediately. 


I would certainly test small-scale. 
Posted by: murbot 4 years ago
10th Degree Black Belt
Thanks for the suggestions.

After migrating to the new server and restoring backups, I would get error (Handshake Failed) when trying to detect only. The patch download wasn't running either. Or rather it ran and reported completion in less than a minute. I called shenanigans. 

After cleaning the patches directory on a handful of machines, I was able to run a detection. After the detection completed on those machines, I re-ran the download and it did its thing for a while and completed successfully. 

I let things settle for a few more hours and ran a detect successfully late last night and a detect and deploy successfully early this morning.

I suspect it may have been fine if I had waited a few hours for the clients and server to settle and catch up with things. It seemed like the patch download needed a good detection to run first and that couldn't happen until the patches dir was cleaned, but it didn't require every single client's patches dir to be cleaned.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ