Closed DrYSG closed 4 years ago
I'm sorry this slipped through the cracks. I assume you've found an answer or abandoned the effort by now?
There is currently no way to retrieve the specific PID from a created service. I'd accept a PR making this possible.
@coreybutler , on Windows-10, I have created an installer for a node.js app. The install process is as follow:
The issue I now have is that I am trying to walk the process list that I get from wincmd.list to match the stats of the process with this service. I can do this manually if I know the PID, but the values returned for that process, are bascially useless to see if this is really the Node.js service. (ie. there can be a lot of node.exe images running on the system, so it is only that I know the PID, that this works. But I have no idea how to find the PID from the SVC?
What I am seeing is that there are actually three processes created, that are grand-child, child, and parent, with the parent process being the ImageName: 'egplwatsonservice.exe', So yes, I can find that process, but it is the grandparent of the process I want.
A picture is worth a 1,000 words, so here is what I am seeing"