I have a Windows Shutdown script that shuts down 10 computers at 9:45PM. And it works. However in the morning when we turn them on some run the shutdown script after they startup. I think what happens is someone manually turns off a few of the computers at night before the Kace sends the 9:45PM shutdown script. Then When the computers check in next it runs the script intended for the night before. I did not build the script our old Kace Admin set it up somehow. It's an offline KScript. Here is the raw XML.

<?xml version="1.0" encoding="utf-8" ?>
<kbots xmlns="http://kace.com/Kbots.xsd">

<config name="Shutdown Windows System 9:45" type="job" id="94" version="1392818099" description="-t specifies timeout in seconds while the message in quotes will be displayed to the user.  Omit for silent immediate shutdown.  Note: a minimum shutdown timeout of 90 seconds is recommended for Run Now executions, and for any Online KScript executions which trigger a shutdown.">

  <execute disconnected="false" logged_off="false">
    <schedule minutes="45" hours="21" daysOfMonth="*" months="*" daysOfWeek="*" />



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

      <launch_program path="%WINDIR%\System32" program="cmd.exe" wait="true" parms="/C shutdown -s -c &quot;Windows will shut down in 5 minutes. Please save your work.&quot; -t 300 -d U:00:00" />
      <log_message type="status" message="DOS Command Issued Successfully." />









So How can I stop this from happening?

0 Comments   [ + ] Show Comments


Please log in to comment



Have run into the same thing, and it really sucks when you have deepfreeze installed, it keeps doing over and over again.

I discovered that when you assign the script it sends the command to the box as a xml file that run like a cron job.  If the box box gets turned off before the command gets carried out, it tries to run it on startup.

I created a smart label I applied the shutdown to.  It looks for the connection status to be true.

My other thought was to push a scheduled task via the k1000 to the machine and let windows task scheduler take care of it, that does not try to make up the job if it did not run already.


Answered 02/19/2014 by: SMal.tmcc
Red Belt

  • We have deep freeze as well so maybe that's the cause. I will try a smart label.
Please log in to comment

with deepfreeze if any of the machines were thawed and checked into the kace box during that time you will to do either 2 things.

turn off the script, thaw the boxes

and either

reboot and force a checkin so the kbox deletes that scipt run on the client side.


manually remove that xml file from the machine local cache.

if you hover over the script on the browser you will see an id, that is the start of the xml file name you will need to remove from the cache.

so in the picture below I would delete the 60-1392763051.xml file and also the kbots.xml file and either force checkin or reboot to rebuild the kbots.xml without the "60...." entry in it

see how all the xml's are indexed by the kbots.xml

Answered 02/19/2014 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja