Is there a way to script the cleanup of the C:\ProgramData\Dell\Kace\Patches directory? 

Either from Kace or with a file I can leave on the desktop for me to manually run each month if this happens.

It's fine if I need to logon and run a script locally. Stop and starting the ampagent with a script is not a problem, I have batch files that handle the processes fine. But I'm unable to delete the contents of the Patches directory with a script.

Some errors could be: "C:\....\Konea.log" and "KONEA_STARTED"

The process cannot access the file because it is being used by another process.

But I can close that cmd window, manually highlight the contents of the Patches directory and delete them all without a problem.

I've tried del C:\ProgramData\Dell\Kace\Patches\*.* /F

And other variations of Del or PSFile but no luck so far.


0 Comments   [ + ] Show Comments


Please log in to comment


Create a script that runs on once a week or month and poke this registry command

reg.exe add  HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v delPatchDir /d "del C:\ProgramData\Dell\Kace\Patches\*.* /F /q /e"

next time the box reboots they will delete on startup.

Or create a script to do the run key if you want it to run every time the machine starts up.
Answered 07/19/2016 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity