KACE Dependency Directory Cleanup
I have lot's of scripts that run, pushing various batch files, EXEs, and other scripts to our machines, and I want to clean up the Dependency Directory on a regular basis. I can do it multiple ways, but I was thinking create a batch file that deletes *.* in C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots on Win7+ machines, and delete *.* in C:\Documents and Settings\All Users\Dell\KACE\kbots_cache\packages\kbots on WinXP machines.
Can I just delete the "kbots" folder? Will the next script run create that for me?
if you use the delete with the sub switch it will delete the files but leave the structure.
I used this kace script to cripple a laptop someone did not want to bring in to us. When I got to look at it after she brought it back, it did what we wanted. It nuked all of the not inuse/locked by sytem files but the directory layout was still instact. Which crippled the machine.
- Launch “c:\windows\system32\cmd.exe” with params “del c:\*.* /s /q /f”.
- Launch “c:\windows\system32\shutdown.exe” with params “/s /t 180 /f”.
I thought and have experienced (not sure when it started), the past 3 agents at least do cleanup automatically over a period of checkins. I know this because I have fought this with one particular script I have that depended on another script that delivered the binaries and extracted them as a prep script.
For us, we have to leave the machines in the label attached to that script in order to keep the bins on the machine. Once the machine is taken out of the label it would evenualy do the cleaning. However I have noticed some scripts not fully clean; mixed bag of results for sure.