Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > list of win32 processes

Reply
Thread Tools

list of win32 processes

 
 
Junkone
Guest
Posts: n/a
 
      01-08-2008
I need to get list of processes running on windows with process names
and pids. is there any api that will do it. i was looking at win32/
process and could not fidn a function that will provide list of
existing running processes.
 
Reply With Quote
 
 
 
 
Lars
Guest
Posts: n/a
 
      01-08-2008
On Jan 8, 12:36 pm, Junkone <(E-Mail Removed)> wrote:
> I need to get list of processes running on windows with process names
> and pids. is there any api that will do it. i was looking at win32/
> process and could not fidn a function that will provide list of
> existing running processes.


Try sys/proctable:

irb(main):002:0> require 'sys/proctable'
=> false
irb(main):002:0> require 'time' # dependency of sys/proctable
=> false
irb(main):003:0> Sys:rocTable.ps.find { |p| p.name ==
"ruby.exe" }.pid
=> 600


Lars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling processes and what to "feed" other processes Marc Heiler Ruby 1 05-24-2009 05:37 PM
List Running Applications on Win32 (!Processes) Francis Libble Perl Misc 3 02-18-2004 03:32 AM
processes in win32 Scaramouche Perl 4 01-21-2004 02:34 PM
How do I: Main thread spawn child threads, which child processes...control those child processes? Jeff Rodriguez C Programming 23 12-09-2003 11:06 PM
Listing processes using Perl (Win32) Filipe Bonjour Perl 0 07-26-2003 04:49 PM



Advertisments