How to Identify the Process a Service is Using

I needed to change permissions on some processes.  The process name for most services nicely matches the service names.  However, I can't locate the name of the process the Messenger spawns in process explorer by name.  Is there a better way to link a service to a process in memory?  (Yes, Messenger is disabled, but the permissions are insecure so picked up on a scan.  I'm just temporarily starting the service to try to see it).

Who is Participating?
whoamConnect With a Mentor Author Commented:
Found it!

So, if you take that process "SVCHOST.EXE" that I spoke of and open it's properties in process explorer(Sysinternals), then go to the SERVICES tab, there you find the Messenger process/servcie listed with the other services.  From there you can choose permissions, modify them as needed.

Thanks all!
it_saigeConnect With a Mentor DeveloperCommented:
You can look at the service properties:

Start -> Run --> services.msc

Choose a service, right-click on it and choose properties.  There is a line under the description that reads 'Path to executable' -Capture.JPG
Although, don't be surprised if you find many Microsoft services use svchost.exe.

QlemoConnect With a Mentor Batchelor and DeveloperCommented:
In Process Explorer you can view the hosted services in the service exe. Indirect, but feasible.
With newer OS TaskManager has own tab displaying service names and their corresponding host file.
You can also search in registry,  if you know the internal name.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Zsolt PribuszConnect With a Mentor Commented:
in powershell you can run this:

Get-WmiObject win32_service | select Name, DisplayName, PathName

PathName points to executable what service is using.
whoamAuthor Commented:
Thanks guys, I left out some details.  Messenger's executable is
"C:\Windows\System32\svchost.exe -k netsnvs"
So, yep it spawns the dreaded "Svchost.exe" in process explorer.  So that's no help.

I need a way to find which svchost.exe is being used by Messenger.

One of the running svchost.exe has the same executable string, but mousing over shows only other services.
QlemoBatchelor and DeveloperCommented:
That's what I tried to tell in http:#a40492720.
You can also use   tasklist /svc   to view the service/exe relation.
whoamAuthor Commented:
The expert comment did not provide the answer I needed, but felt they deserved points for effort and helping me get there.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.