Summary:  Some users have reported that using a script on 64 bit to defrag clients do not run.  Our agent is currently a 32-bit and KACE is working on a 64-bit version.  Find below a script that will run on both:

Copy/paste the below info into a new script by doing the following: 

  1. Scripting > Scripts > Choose Action > Import from XML
  1. Paste below info in
  1. Save script



<?xml version="1.0" encoding="utf-8" ?>

<kbots xmlns="">



<config name="CUSTOM - Defragment the C: drive" type="policy" id="114" version="1327423077" description="Script to defragment the c: ">


  <execute disconnected="true" logged_off="true">







  <verify on_failure="break" attempts="1">


    <directory_exists path="&quot;C:\Program Files (x86)\&quot;" />



      <launch_program path="$(KACE_SYS_DIR)" program="cmd.exe" wait="true" parms="/C start /wait %Windir%\Sysnative\defrag.exe C: -f " />

      <log_message type="status" message="Defrag Issued Successfully." />




      <log_message type="output" message="Not 64 bit system" />



        <launch_program path="$(KACE_SYS_DIR)\" program="cmd.exe" wait="false" parms="/C start /wait %SYSTEMROOT%\system32\defrag C: -f" />