in reply to Windows process

This will return a list of running process ids, names and their command lines on Windows XP and above. For Windows 2000 and lower you will need to find a workaround.
use Win32::OLE; my $wmi = Win32::OLE->GetObject("winmgmts:") or die "wmi connect failed!"; my $P = $wmi->ExecQuery("SELECT * FROM Win32_Process") or die "Win32_Process connect failed!"; foreach my $p (in $P) { print join(',' , $p->ProcessId, $p->Name, $p->CommandLine)."\n"; }
For more info on WMI and Win32_Process see Microsoft's documentaion

Replies are listed 'Best First'.
Re^2: Windows process
by djberg96 (Acolyte) on Sep 17, 2004 at 03:12 UTC
    This has been wrapped via Win32::Process::Info. And, it should work on 2000 and NT as well (SP4 or later for NT).

    In addition to the other suggestions, there's always the ol' pid file trick. It has also been wrapped - see Proc::PID::File.

    Dan