Hi,
Execute the following. The process can be identified and terminated.
require 'win32ole'
require 'win32/process'
wmi = WIN32OLE.connect("winmgmts://")
processes = wmi.ExecQuery("select * from Win32_process")
for process in processes do
if process.Name.include? "rubyw.exe" then
puts "Name: #{process.Name}"
#~ puts "Process ID: #{process.Pid}"
puts process.Terminate
puts "Finished Checking Processess and killing any process
Leakage"
elsif process.Name.include? "anyotherprocess.exe" then
#~ puts "Name: #{process.Name}"
#~ puts "Process ID: #{process.Pid}"
#~ puts process.Terminate
end
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
You received this message because you are subscribed to
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]