Hi!
 
I'm trying to make a code for killing all running processes that i need to close.
I've this function for _javascript_:
 
[code]
function KillProcess(PName)
{
  var Count = 0;
  var p = Sys.WaitProcess(PName, 1000, 1);
 
  while (p.Exists) {
    Count++;
    p.Terminate();
    while (p.Exists) Delay(50);
    p = Sys.WaitProcess(PName, 1000, 1);
  }
  return Count;
}
...
KillProcess("Excel");
...
[/code]
 
 
Is there a way to do this in ruby+watir? I was reading about the Sys::Process, but I don't find the way. I'm running on a Windows 2000.
I really don't want to end up making a bat file =(..
 
any help would be really appreciated
 
Cheers from Argentina, and Thanks in advance!
 
 
Rodrigo Julian Martin
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to