Monday, March 26, 2012

JavaScript (Win32 CScript) -- List running processes

// listing or enumerating the running process with windows command line

var e = new Enumerator (GetObject("winmgmts:").InstancesOf("Win32_process"));
for (; !e.atEnd(); e.moveNext()) {
    var proc = e.item ();
}