/build/static/layout/Breadcrumb_cap_w.png

Shutdown Computer script runns after computer starts up

Hi!

 

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">
<kbot>

<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="*" />
  </execute>

</config>

<compliance>

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


    <on_verify_success>
      <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." />
    </on_verify_success>

    <on_verify_failure>

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

</compliance>

</kbot>
</kbots>

 

So How can I stop this from happening?


0 Comments   [ + ] Show comments

Answers (2)

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

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.

http://technet.microsoft.com/en-us/library/cc748993.aspx#BKMK_cmd


Comments:
  • We have deep freeze as well so maybe that's the cause. I will try a smart label. - Chadg001 10 years ago
Posted by: SMal.tmcc 10 years ago
Red Belt
0

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.

or

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
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