/build/static/layout/Breadcrumb_cap_w.png

How can I put a pause in the KACE script?

Hello all,

Ok, so I am trying to do a few things here, but it seems fairly straight forward. I want KACE to verify a document exists. If it does find the file I want to run a batch file after that to clean up some of the folders around the file. If it fails to find the document I want to que a file sync and get the document. Then I want the script to pause for the file sync to complete and then continue to check the verification again. I am thinking the best way to do this would be do add a pause directly into the XML itself, but when I tried to do that it wouldn't save. Any ideas on how I can make this script work?

Thanks

2 Comments   [ + ] Show comments
  • Oh I forgot to mention that both the batch file and the file sync work just fine independently. I am just having issues tying the two together. If anyone has an idea on how to make the batch file execute after the file sync or how to make my previous idea work that would be helpful. - Jhogue 10 years ago
  • This looks like a problem requiring a solution that monitors process activity and kicks off the next step in the sequence when a specific process terminates. This requires vbscript rather than a batch file. - EdT 10 years ago
    • Thank you very much! I will look into going about it that way. - Jhogue 10 years ago

Answers (3)

Answer Summary:
Posted by: ondrar 6 years ago
Black Belt
2
I know this is an old topic, but here's another answer. (From https://ss64.com/nt/timeout.html) 

Ping a loopback adapter for the amount of time you want to pause for, and check "Wait for completion."

Launch “C:\Windows\System32\cmd.exe” with params “/c PING -n 301 127.0.0.1”.
Posted by: Jhogue 10 years ago
Senior Yellow Belt
2
I found an answer that works! I had set the KACE script to force a check on the client side using runkbot 6 0 and then wait for completion before running the .bat file. 
Posted by: SMal.tmcc 10 years ago
Red Belt
2
Glad you found the solution, for future reference:

If you also own a k2000, there is a file on it called ksleep to allow the use of pauses.  You just use "ksleep ##"  (## = the time is seconds).  I use this a lot on both my k2000 post tasks and also k1000 scripts.  As long as you are licensed for the k2000 you can use this file.

Comments:
  • Yes we also have the k2000. I haven't quite started my training on it yet, so I will look forward to this feature! That seems like it would have been a useful alternate. - Jhogue 10 years ago
    • look for it at
      \\ikbox\peinst\winpe_build\amd64\windows\system32
      or
      \\ikbox\peinst\winpe_build\x86\windows\system32 - SMal.tmcc 10 years ago

Don't be a Stranger!

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

Sign up! or login

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