You can write the WMI script in Ruby:

require 'win32ole'
strComputer = "."
objWMIService = WIN32OLE.connect \
    ("winmgmts:\\#{strComputer}\root\cimv2")
colProcessList = objWMIService.ExecQuery \
    ("Select * from Win32_Process Where ProcessID = 3672")
colProcessList.each do |objProcess|
    objProcess.Terminate()
end

Cheers,
Dave