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!
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1

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

Please log in to comment

Answers

0

add a ping loop to cause a delay

ping 172.0.1.2 -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

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

Share