coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.79k stars 358 forks source link

Just get a pid by application name. #230

Closed TongDaDa closed 4 years ago

TongDaDa commented 5 years ago

I Want to find a pid by targeted application name, however, this package not have now.

Its list method is get all the services on the computer, so I want to get some pid by a name of EXE

How do I do to?

TongDaDa commented 5 years ago

In addition, my listed services was messy code..

_15482149421553

If this situation is caused by certain computer so that it wouldn't uses stably.

coreybutler commented 4 years ago

Just filter the array so it only returns what you want.