Scripting Question

Change "Wait for Completion" Time for Scripts

03/10/2014 6366 views

I am in the process of automating a Spybot S&D scan and I have one problem- some of the PCs don't finish the scan in the time that the KBOX has alotted, so the script fails. There are tasks after the full scan meant to process the logs and notify of any infections.

Is there a way to increase the "Wait for Completion" time for scripts? I can't find a setting anywhere.

Answer Summary:
Thanks, I hadn't thought about writing a program or batch file to execute the scans. That makes the most sense. Appreciate the insight!
0 Comments   [ + ] Show comments


Community Chosen Answer


Another idea could be to do not make K1000 wait for complention at all and use the Custom Invententory rule to get the results.

You can use a VBSCRIPT to run the SpyBot command usinf WShell.run ( http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.85%29.aspx )

When the command is done you can store the results in a file or a regisrty key that you will grab with a Custom Inventory Rule

When you finish to store the result you can force programatically an inventory telling the script to run the command: runkbot -s 4 0

Another idea is to write a VBS that launches the SpyBox process without waiting the command termination and build a loop that will check (using WMI) is the process is still there. 

When the process is gone store te results somewhere and make the script to invoke runkbot -s 4 0 and so your data will be available in the inventory.

Good luck :-)

Marco - StockTrader

Answered 03/10/2014 by: StockTrader
Red Belt

All Answers


add a ping loop to cause a delay

ping -n 1 -w 10000 > nul

The -w 10000 part specifies the desired timeout in milliseconds.

The -n 1 part tells ping that it should only tries once (normally it'd try 4 times).

The > nul part is appended so the ping command doesn't output anything to screen.

Answered 03/10/2014 by: SMal.tmcc
Red Belt

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