All Forums >> [Scripting] >> Post a VBScript >> Wait for the completion of a task, before continuing. Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I wrote this function to use when launching multiple CScripts to handle various functions. Since it uses WMI interface and I can specify a computer name for the query, I added the computer name as a value for the function.
This function I wrote so I could wait until I only ended up with 1 cscript or 1 wscript left running. (When launching multiple cscripts)
You call this as
quote:
Do Until NumberofProcesses(".", "cscript.exe") = 1 WScript.echo "They're still working!" Loop
This function relies on another function I wrote.
This function simply returns an array of the Processes on whatever computer specified (ProcessList("."))
Hope this helps someone! :)
I plan on posting more code on here... A lot of the code I have was because I had some problem to solve in the course of administrating a multi-location network.
Enjoy!
< Message edited by jfieldsx2416 -- 10/22/2008 5:47:36 AM >