/build/static/layout/Breadcrumb_cap_w.png

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?


1 Comment   [ + ] Show comment
  • Depending on how you are creating your scripts. You can make then online shell scripts which give you the option to delete the downloaded files.

    If they need to be offline, I think the RMDIR option would be a good one to schedule and run monthly but you have check that it worked as the script you write would be in the directly you are deleting. - nshah 10 years ago

Answers (3)

Posted by: SMal.tmcc 10 years ago
Red Belt
1

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.

  1. Launch c:\windows\system32\cmd.exe with params del c:\*.* /s /q /f.
  2. Launch c:\windows\system32\shutdown.exe with params /s /t 180 /f.
Posted by: BHC-Austin 10 years ago
4th Degree Black Belt
1

You can also try the RMDIR command. Something like:

rmdir /s /q C:\Documents and Settings\All Users\Dell\KACE\kbots_cache\packages\kbots\*

That will delete all the subfolders under kbots (and recurse into those as well) but leave the kbots folder itself

Posted by: worzie 10 years ago
Fourth Degree Brown Belt
1

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.

 
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