Hi,
I am trying to get process information from Windows server. Using
examples I have found on the web and in documentation I have come up
with the following script.
require 'win32ole'
wmi = WIN32OLE.connect("winmgmts://")
processes = wmi.ExecQuery("select * from win32_process")
for process in processes do
process_list = {process.ProcessId =>
"#{process.ProcessId}:#{process.CreationDate}:#{process.WorkingSetSize}:#{process.KernelModeTime}:#{process.UserModeTime}"}
p process_list
end
I would like to be able to call the Win32_Process.GetOwner method from
the WMI class and include the process owner in the output of the above
script.
I would appreciate any assistance.
Thanks.
Cheers, Barrie
···
--
Posted via http://www.ruby-forum.com/.